summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2016-12-07 13:57:16 +0000
committerMaxime Coste <mawww@kakoune.org>2016-12-07 13:57:16 +0000
commitbc8b30c988cf8b471cac0b2bc5cea9fd8594c846 (patch)
treec3bcebb1cfe869567fd3df260f54ffc0bbdd00c1 /src
parent1383614a5fae9f8cd8e3adc923b5ae71e7e372fa (diff)
Replace some string concatenations with a format call
Diffstat (limited to 'src')
-rw-r--r--src/highlighters.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/highlighters.cc b/src/highlighters.cc
index 75398039..21b557c4 100644
--- a/src/highlighters.cc
+++ b/src/highlighters.cc
@@ -254,14 +254,13 @@ public:
{
auto colon = find(spec, ':');
if (colon == spec.end())
- throw runtime_error("wrong face spec: '" + spec +
- "' expected <capture>:<facespec>");
+ throw runtime_error(format("wrong face spec: '{}' expected <capture>:<facespec>", spec));
get_face({colon+1, spec.end()}); // throw if wrong face spec
int capture = str_to_int({spec.begin(), colon});
faces.emplace_back(capture, String{colon+1, spec.end()});
}
- String id = "hlregex'" + params[0] + "'";
+ String id = format("hlregex'{}'", params[0]);
Regex ex{params[0], Regex::optimize};