From f4b006bc0cd7fc471e4ebfa8540e557577d05593 Mon Sep 17 00:00:00 2001 From: Tsarevich Dmitry Date: Sun, 23 Feb 2020 20:16:12 +0300 Subject: [PATCH] [perf] Hint compiler to inline compute strlen Add const modifier to buffers - better hint for compiler to inline buffer size instead of computing strlen in runtime. --- src/format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/format.c b/src/format.c index ca845f11..72881e22 100644 --- a/src/format.c +++ b/src/format.c @@ -250,8 +250,8 @@ static void ToValidLabel(char* Label, BOOL bFAT) { size_t i, j, k; BOOL found; - WCHAR unauthorized[] = L"*?,;:/\\|+=<>[]\""; - WCHAR to_underscore[] = L"\t."; + const WCHAR unauthorized[] = L"*?,;:/\\|+=<>[]\""; + const WCHAR to_underscore[] = L"\t."; WCHAR *wLabel = utf8_to_wchar(Label); if (wLabel == NULL)