From 246b5262c6c05c796f22d0f68a98d0810141ec61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 19 Jan 2021 10:29:24 +0100 Subject: [PATCH] Avoid among switch-case jump table overhead for just two possible values. --- source/vibe/core/path.d | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/vibe/core/path.d b/source/vibe/core/path.d index 093bb3a..f2eff9c 100644 --- a/source/vibe/core/path.d +++ b/source/vibe/core/path.d @@ -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)