mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
do not assign in conditional statements
This commit is contained in:
@ -631,9 +631,9 @@ void CopyDir(const std::string& source_path, const std::string& dest_path)
|
||||
// Returns the current directory
|
||||
std::string GetCurrentDir()
|
||||
{
|
||||
char* dir;
|
||||
// Get the current working directory (getcwd uses malloc)
|
||||
if (!(dir = __getcwd(nullptr, 0)))
|
||||
char* dir = __getcwd(nullptr, 0);
|
||||
if (!dir)
|
||||
{
|
||||
ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s", GetLastErrorMsg().c_str());
|
||||
return nullptr;
|
||||
|
@ -248,8 +248,8 @@ bool cInterfaceWGL::Create(void* window_handle, bool core)
|
||||
return false;
|
||||
}
|
||||
|
||||
int pixel_format;
|
||||
if (!(pixel_format = ChoosePixelFormat(m_dc, &pfd)))
|
||||
int pixel_format = ChoosePixelFormat(m_dc, &pfd);
|
||||
if (!pixel_format)
|
||||
{
|
||||
PanicAlert("(2) Can't find a suitable PixelFormat.");
|
||||
return false;
|
||||
@ -261,7 +261,8 @@ bool cInterfaceWGL::Create(void* window_handle, bool core)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(m_rc = wglCreateContext(m_dc)))
|
||||
m_rc = wglCreateContext(m_dc);
|
||||
if (!m_rc)
|
||||
{
|
||||
PanicAlert("(4) Can't create an OpenGL rendering context.");
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user