diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-12 08:33:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-12 08:33:28 +0200 |
commit | ce177a4b12f2fef490683e53ccc9ee8f4d3e0bd6 (patch) | |
tree | 34aae6ca8abb182fdf20a59b6ab3a08ef1e1db55 /build2/utility.cxx | |
parent | b01fde82ba1e70af68ac78607daf421334f60cc7 (diff) |
Add workaround for Clang module import during preprocessing
Diffstat (limited to 'build2/utility.cxx')
-rw-r--r-- | build2/utility.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/build2/utility.cxx b/build2/utility.cxx index 09a2342..2b3f785 100644 --- a/build2/utility.cxx +++ b/build2/utility.cxx @@ -277,34 +277,34 @@ namespace build2 } void - append_options (cstrings& args, const strings& sv) + append_options (cstrings& args, const strings& sv, size_t n) { - if (!sv.empty ()) + if (n != 0) { - args.reserve (args.size () + sv.size ()); + args.reserve (args.size () + n); - for (const string& s: sv) - args.push_back (s.c_str ()); + for (size_t i (0); i != n; ++i) + args.push_back (sv[i].c_str ()); } } void - append_options (strings& args, const strings& sv) + append_options (strings& args, const strings& sv, size_t n) { - if (!sv.empty ()) + if (n != 0) { - args.reserve (args.size () + sv.size ()); + args.reserve (args.size () + n); - for (const string& s: sv) - args.push_back (s); + for (size_t i (0); i != n; ++i) + args.push_back (sv[i]); } } void - hash_options (sha256& csum, const strings& sv) + hash_options (sha256& csum, const strings& sv, size_t n) { - for (const string& s: sv) - csum.append (s); + for (size_t i (0); i != n; ++i) + csum.append (sv[i]); } bool |