From 5792d1d681ab50d5ece4c172195d59a1e30c4655 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 edbfedae3..be93fabdc 100644 --- a/primedev/client/latencyflex.cpp +++ b/primedev/client/latencyflex.cpp @@ -20,10 +20,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