diff options
| author | Maxime Coste <mawww@kakoune.org> | 2016-12-07 13:57:16 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2016-12-07 13:57:16 +0000 |
| commit | bc8b30c988cf8b471cac0b2bc5cea9fd8594c846 (patch) | |
| tree | c3bcebb1cfe869567fd3df260f54ffc0bbdd00c1 /src | |
| parent | 1383614a5fae9f8cd8e3adc923b5ae71e7e372fa (diff) | |
Replace some string concatenations with a format call
Diffstat (limited to 'src')
| -rw-r--r-- | src/highlighters.cc | 5 |
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}; |
