aboutsummaryrefslogtreecommitdiff
path: root/build2/utility.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/utility.cxx')
-rw-r--r--build2/utility.cxx26
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