aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-01-19 08:56:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-01-19 08:56:55 +0200
commita63bfa30007afb43e3b98c1975ea5648e487be9a (patch)
tree0e99415788441d8daa879c9eee253061f383e2f3
parentd0954351f53c0de0d2b0a0e0f422a40f82142d5c (diff)
Remove unused code
-rw-r--r--build2/scope.cxx25
1 files changed, 1 insertions, 24 deletions
diff --git a/build2/scope.cxx b/build2/scope.cxx
index 6fca9fb..a15eeba 100644
--- a/build2/scope.cxx
+++ b/build2/scope.cxx
@@ -811,34 +811,11 @@ namespace build2
scope& scope_map::
find (const dir_path& k)
{
- scope_map_base& m (*this);
-
assert (k.normalized (false)); // Allow non-canonical dir separators.
- // Using find_sup() seems to be slightly slower.
- //
-#if 1
+ scope_map_base& m (*this);
auto i (m.find_sup (k));
assert (i != m.end ()); // Should have global scope.
return i->second;
-#else
- // Normally we would have a scope for the full path so try that before
- // making any copies.
- //
- auto i (m.find (k)), e (m.end ());
-
- if (i != e)
- return i->second;
-
- for (dir_path d (k.directory ());; d = d.directory ())
- {
- auto i (m.find (d));
-
- if (i != e)
- return i->second;
-
- assert (!d.empty ()); // We should have the global scope.
- }
-#endif
}
}