From f75aff142508796ba66cc43c3135cbb317c920db Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 16 Jun 2024 13:14:24 +0200 Subject: [PATCH] Use double brackets to let compiler know assignment is intentional (#707) Use double brackets to let compiler know that assignment inside `if` statement is intentional and not the cause of a missing second `=`. --- primedev/client/latencyflex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/primedev/client/latencyflex.cpp b/primedev/client/latencyflex.cpp index 25e38c7a4..395578709 100644 --- a/primedev/client/latencyflex.cpp +++ b/primedev/client/latencyflex.cpp @@ -24,10 +24,10 @@ ON_DLL_LOAD_CLIENT_RELIESON("client.dll", LatencyFlex, ConVar, (CModule module)) // https://ishitatsuyuki.github.io/post/latencyflex/ HMODULE pLfxModule; - if (pLfxModule = LoadLibraryA("latencyflex_layer.dll")) + if ((pLfxModule = LoadLibraryA("latencyflex_layer.dll"))) m_winelfx_WaitAndBeginFrame = reinterpret_cast(reinterpret_cast(GetProcAddress(pLfxModule, "lfx_WaitAndBeginFrame"))); - else if (pLfxModule = LoadLibraryA("latencyflex_wine.dll")) + else if ((pLfxModule = LoadLibraryA("latencyflex_wine.dll"))) m_winelfx_WaitAndBeginFrame = reinterpret_cast(reinterpret_cast(GetProcAddress(pLfxModule, "winelfx_WaitAndBeginFrame"))); else