mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Support the slower order stable sequence.unique with an extra flag argument.
[SVN r35522]
This commit is contained in:
@@ -149,17 +149,30 @@ rule length ( s * )
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
rule unique ( list * )
|
||||
rule unique ( list * : stable ? )
|
||||
{
|
||||
local result ;
|
||||
local prev ;
|
||||
for local i in [ SORT $(list) ]
|
||||
if $(stable)
|
||||
{
|
||||
if $(i) != $(prev)
|
||||
for local f in $(list)
|
||||
{
|
||||
result += $(i) ;
|
||||
if ! $(f) in $(result)
|
||||
{
|
||||
result += $(f) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for local i in [ SORT $(list) ]
|
||||
{
|
||||
if $(i) != $(prev)
|
||||
{
|
||||
result += $(i) ;
|
||||
}
|
||||
prev = $(i) ;
|
||||
}
|
||||
prev = $(i) ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user