From 5607313a91e5ca0113b1f8b9acfd02c1fb105346 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 19 Jan 2017 12:45:04 +0200 Subject: Get rid of project_name_pool With small string optimizations this is most likely a hindrance rather that an optimization. --- build2/name.ixx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'build2/name.ixx') 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); -- cgit v1.1