aboutsummaryrefslogtreecommitdiff
path: root/build2/config
diff options
context:
space:
mode:
Diffstat (limited to 'build2/config')
-rw-r--r--build2/config/module.cxx14
1 files changed, 1 insertions, 13 deletions
diff --git a/build2/config/module.cxx b/build2/config/module.cxx
index 19b5125..4639d98 100644
--- a/build2/config/module.cxx
+++ b/build2/config/module.cxx
@@ -19,19 +19,7 @@ namespace build2
// prefix of this variable name.
//
auto& sm (saved_modules);
- auto i (sm.end ());
-
- if (!sm.empty ())
- {
- i = sm.upper_bound (n);
-
- // Get the greatest less than, if any. We might still not be a
- // suffix. And we still have to check the last element if
- // upper_bound() returned end().
- //
- if (i == sm.begin () || !sm.key_comp ().prefix ((--i)->first, n))
- i = sm.end ();
- }
+ auto i (sm.find_sup (n));
// If no module matched, then create one based on the variable name.
//