Skip to content

Commit

Permalink
Use double brackets to let compiler know assignment is intentional (#707
Browse files Browse the repository at this point in the history
)

Use double brackets to let compiler know that assignment inside `if` statement is intentional and not the cause of a missing second `=`.
  • Loading branch information
Jan200101 authored Jun 16, 2024
1 parent 4a716e5 commit f75aff1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions primedev/client/latencyflex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<void (*)()>(reinterpret_cast<void*>(GetProcAddress(pLfxModule, "lfx_WaitAndBeginFrame")));
else if (pLfxModule = LoadLibraryA("latencyflex_wine.dll"))
else if ((pLfxModule = LoadLibraryA("latencyflex_wine.dll")))
m_winelfx_WaitAndBeginFrame =
reinterpret_cast<void (*)()>(reinterpret_cast<void*>(GetProcAddress(pLfxModule, "winelfx_WaitAndBeginFrame")));
else
Expand Down

0 comments on commit f75aff1

Please sign in to comment.