Avoid among switch-case jump table overhead for just two possible values.
This commit is contained in:
parent
dc0fe5ad73
commit
246b5262c6
|
@ -1303,8 +1303,7 @@ struct WindowsPathFormat {
|
||||||
|
|
||||||
static bool isSeparator(dchar ch)
|
static bool isSeparator(dchar ch)
|
||||||
@nogc {
|
@nogc {
|
||||||
import std.algorithm.comparison : among;
|
return ch == '\\' || ch == '/';
|
||||||
return ch.among!('\\', '/') != 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static string getAbsolutePrefix(string path)
|
static string getAbsolutePrefix(string path)
|
||||||
|
|
Loading…
Reference in a new issue