mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 06:00:35 +03:00
Remove use of automatic adjacent string literal concatenation from phobos
This commit is contained in:
parent
cf5a46d716
commit
a656f26e9e
26 changed files with 94 additions and 94 deletions
|
@ -2941,15 +2941,15 @@ if (Rs.length > 1 && allSatisfy!(isInputRange, staticMap!(Unqual, Rs)))
|
|||
static string makeSwitchIncrementCounter()
|
||||
{
|
||||
string result =
|
||||
"auto next = _current == Rs.length - 1 ? 0 : _current + 1;\n"
|
||||
"auto next = _current == Rs.length - 1 ? 0 : _current + 1;\n"~
|
||||
"switch (next) {\n";
|
||||
foreach (i, R; Rs)
|
||||
{
|
||||
auto si = to!string(i);
|
||||
auto si_1 = to!string(i ? i - 1 : Rs.length - 1);
|
||||
result ~= "case "~si~": "
|
||||
"if (!source["~si~"].empty) { _current = "~si~"; return; }\n"
|
||||
"if ("~si~" == _current) { _current = _current.max; return; }\n"
|
||||
result ~= "case "~si~": "~
|
||||
"if (!source["~si~"].empty) { _current = "~si~"; return; }\n"~
|
||||
"if ("~si~" == _current) { _current = _current.max; return; }\n"~
|
||||
"goto case "~to!string((i + 1) % Rs.length)~";\n";
|
||||
}
|
||||
return result ~ "default: assert(0); }";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue