aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/worker/worker.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index 49248b1..2dcd955 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -9,7 +9,7 @@
#include <map>
#include <regex>
-#include <cstring> // strchr()
+#include <cstring> // strchr(), strncmp()
#include <sstream>
#include <iostream>
#include <algorithm> // find(), find_if(), remove_if()
@@ -1004,10 +1004,10 @@ build (size_t argc, const char* argv[])
size_t n (19);
auto space = [] (char c) {return c == ' ' || c == '\t';};
- for (const string& s:
+ for (const char* s:
reverse_iterate (step_args (config_args, step_id::bpkg_create)))
{
- if (s.compare (0, n, "config.install.root") == 0 &&
+ if (strncmp (s, "config.install.root", n) == 0 &&
(s[n] == '=' || space (s[n])))
{
while (space (s[n])) ++n; // Skip spaces.
@@ -1017,7 +1017,7 @@ build (size_t argc, const char* argv[])
// Note that the config.install.root variable value may
// potentially be quoted.
//
- install_root = dir_path (unquote (string (s, n, s.size () - n)));
+ install_root = dir_path (unquote (s + n));
break;
}
}
@@ -1409,7 +1409,7 @@ build (size_t argc, const char* argv[])
{
step_id s (step_id::bpkg_module_create);
- for (const string& m: step_args (modules, s))
+ for (const char* m: step_args (modules, s))
{
if (!mods.empty ())
mods += ' ';
@@ -2177,7 +2177,7 @@ build (size_t argc, const char* argv[])
string mods; // build2 create meta-operation parameters.
- for (const string& m: step_args (modules, s, f))
+ for (const char* m: step_args (modules, s, f))
{
mods += mods.empty () ? ", " : " ";
mods += m;