mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 01:32:12 +00:00
Optimize property-set.get: avoid linear search.
[SVN r26579]
This commit is contained in:
@@ -309,7 +309,19 @@ class property-set
|
||||
# Returns all values of 'feature'.
|
||||
rule get ( feature )
|
||||
{
|
||||
return [ feature.get-values $(feature) : $(self.raw) ] ;
|
||||
if ! $(self.map-built)
|
||||
{
|
||||
# For each feature, create member var and assign all
|
||||
# values to it. Since all regular member vars start with
|
||||
# 'self', there will be no conflicts between names.
|
||||
self.map-built = true ;
|
||||
for local v in $(self.raw)
|
||||
{
|
||||
$(v:G) += $(v:G=) ;
|
||||
}
|
||||
}
|
||||
|
||||
return $($(feature)) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user