minor code cleanup
This commit is contained in:
parent
d466193ee7
commit
1d51e6922a
|
@ -250,7 +250,7 @@ HighlighterAndId colorize_regex_factory(HighlighterParameters params)
|
||||||
|
|
||||||
String id = "colre'" + params[0] + "'";
|
String id = "colre'" + params[0] + "'";
|
||||||
|
|
||||||
Regex ex{params[0].begin(), params[0].end(), boost::regex::optimize};
|
Regex ex{params[0].begin(), params[0].end(), Regex::optimize};
|
||||||
|
|
||||||
return HighlighterAndId(id, RegexColorizer(std::move(ex),
|
return HighlighterAndId(id, RegexColorizer(std::move(ex),
|
||||||
std::move(colors)));
|
std::move(colors)));
|
||||||
|
@ -635,8 +635,8 @@ HighlighterAndId region_factory(HighlighterParameters params)
|
||||||
if (params.size() != 3)
|
if (params.size() != 3)
|
||||||
throw runtime_error("wrong parameter count");
|
throw runtime_error("wrong parameter count");
|
||||||
|
|
||||||
Regex begin{params[0], boost::regex::nosubs | boost::regex::optimize };
|
Regex begin{params[0], Regex::nosubs | Regex::optimize };
|
||||||
Regex end{params[1], boost::regex::nosubs | boost::regex::optimize };
|
Regex end{params[1], Regex::nosubs | Regex::optimize };
|
||||||
const ColorPair colors = get_color(params[2]);
|
const ColorPair colors = get_color(params[2]);
|
||||||
|
|
||||||
auto func = [colors](const Context&, DisplayBuffer& display_buffer,
|
auto func = [colors](const Context&, DisplayBuffer& display_buffer,
|
||||||
|
@ -662,8 +662,8 @@ HighlighterAndId region_ref_factory(HighlighterParameters params)
|
||||||
if (params.size() != 3 and params.size() != 4)
|
if (params.size() != 3 and params.size() != 4)
|
||||||
throw runtime_error("wrong parameter count");
|
throw runtime_error("wrong parameter count");
|
||||||
|
|
||||||
Regex begin{params[0], boost::regex::nosubs | boost::regex::optimize };
|
Regex begin{params[0], Regex::nosubs | Regex::optimize };
|
||||||
Regex end{params[1], boost::regex::nosubs | boost::regex::optimize };
|
Regex end{params[1], Regex::nosubs | Regex::optimize };
|
||||||
const String& name = params[2];
|
const String& name = params[2];
|
||||||
|
|
||||||
auto func = [name](const Context& context, DisplayBuffer& display_buffer,
|
auto func = [name](const Context& context, DisplayBuffer& display_buffer,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user