aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-06-05 14:54:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-06-05 14:54:50 +0200
commit2ea2446b8ff5c08469d16a0deb951b0962924cec (patch)
tree203984a6fb498fbbfbaed6e86432134788bf67ef
parent653c58bc41624ab545edaffcb3acf047cd87244e (diff)
Cosmetic change
-rw-r--r--build2/cc/compile-rule.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/build2/cc/compile-rule.cxx b/build2/cc/compile-rule.cxx
index d2ed278..dd187ba 100644
--- a/build2/cc/compile-rule.cxx
+++ b/build2/cc/compile-rule.cxx
@@ -1232,11 +1232,9 @@ namespace build2
// This is like prerequisite search.
//
- if (optional<string> de = tt.default_extension (tk, s, nullptr, true))
- if (*de == e)
- return true;
+ optional<string> de (tt.default_extension (tk, s, nullptr, true));
- return false;
+ return de && *de == e;
};
small_vector<const target_type*, 2> r;