Skip to content

Commit

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

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 and wolf109909 committed Oct 21, 2024
1 parent 41c3428 commit 5792d1d
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 @@ -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<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 5792d1d

Please sign in to comment.