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)
|
||||
@nogc {
|
||||
import std.algorithm.comparison : among;
|
||||
return ch.among!('\\', '/') != 0;
|
||||
return ch == '\\' || ch == '/';
|
||||
}
|
||||
|
||||
static string getAbsolutePrefix(string path)
|
||||
|
|
Loading…
Reference in a new issue