diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-19 12:45:04 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-19 12:45:04 +0200 |
commit | 5607313a91e5ca0113b1f8b9acfd02c1fb105346 (patch) | |
tree | b14fd2737b88f90e9d142d8e6eff36876e0f8b5a /build2/name.ixx | |
parent | 8ecc2d18bf86b1021a31a2e5d01e71afbaa1efd0 (diff) |
Get rid of project_name_pool
With small string optimizations this is most likely a hindrance rather
that an optimization.
Diffstat (limited to 'build2/name.ixx')
-rw-r--r-- | build2/name.ixx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/build2/name.ixx b/build2/name.ixx index 4a8c86a..c77846a 100644 --- a/build2/name.ixx +++ b/build2/name.ixx @@ -7,13 +7,7 @@ namespace build2 inline int name:: compare (const name& x) const { - int r; - - // Project string is pooled, so for equality can just compare pointers. - // - r = proj == x.proj - ? 0 - : proj == nullptr || (x.proj != nullptr && *proj < *x.proj) ? -1 : 1; + int r (proj < x.proj ? -1 : (proj > x.proj ? 1 : 0)); if (r == 0) r = dir.compare (x.dir); |