aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbuild2/script/run.cxx10
-rw-r--r--libbuild2/utility.cxx4
2 files changed, 10 insertions, 4 deletions
diff --git a/libbuild2/script/run.cxx b/libbuild2/script/run.cxx
index fa6067e..8b609f1 100644
--- a/libbuild2/script/run.cxx
+++ b/libbuild2/script/run.cxx
@@ -1429,7 +1429,10 @@ namespace build2
// number (start from one) in the script.
//
if (li > 0)
- p += "-" + to_string (li);
+ {
+ p += '-';
+ p += to_string (li);
+ }
// 0 if belongs to a single-command expression, otherwise is the
// command number (start from one) in the expression.
@@ -1439,7 +1442,10 @@ namespace build2
// script. These cases are mutually exclusive and so are unambiguous.
//
if (ci > 0)
- p += "-" + to_string (ci);
+ {
+ p += '-';
+ p += to_string (ci);
+ }
return normalize (move (p), temp_dir (env), ll);
};
diff --git a/libbuild2/utility.cxx b/libbuild2/utility.cxx
index 31be3aa..3eeeeaa 100644
--- a/libbuild2/utility.cxx
+++ b/libbuild2/utility.cxx
@@ -131,13 +131,13 @@ namespace build2
if (p.absolute ())
{
if (p == b)
- return cur ? "." + p.separator_string () : string ();
+ return cur ? '.' + p.separator_string () : string ();
#ifndef _WIN32
if (!home.empty ())
{
if (p == home)
- return "~" + p.separator_string ();
+ return '~' + p.separator_string ();
}
#endif