diff options
Diffstat (limited to 'libbuild2/name.ixx')
-rw-r--r-- | libbuild2/name.ixx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libbuild2/name.ixx b/libbuild2/name.ixx index 837915f..a3ee94b 100644 --- a/libbuild2/name.ixx +++ b/libbuild2/name.ixx @@ -20,6 +20,22 @@ namespace build2 if (r == 0) r = pair < x.pair ? -1 : (pair > x.pair ? 1 : 0); + if (r == 0) + { + bool p (pattern); + bool xp (x.pattern); + + r = p == xp ? 0 : (p ? 1 : -1); + + if (r == 0 && p) + { + auto p (static_cast<uint8_t> (*pattern)); + auto xp (static_cast<uint8_t> (*x.pattern)); + + r = p < xp ? -1 : (p > xp ? 1 : 0); + } + } + return r; } |