mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-19 01:11:36 +03:00
Replace some string concatenations with a format call
This commit is contained in:
parent
1383614a5f
commit
bc8b30c988
@ -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};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user