Fix a few issues reported by clang.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2021-02-07 13:46:50 +00:00
parent 0b692ee7f8
commit 4ae655caab
3 changed files with 8 additions and 8 deletions

View file

@ -99,7 +99,7 @@ BYTE* CommonFrame::GetResource(WORD id, LPCSTR lpType, DWORD expectedSize)
if (myResource.empty()) if (myResource.empty())
{ {
LogFileOutput("FindResource: could not load resource %s\n", filename); LogFileOutput("FindResource: could not load resource %s\n", filename.c_str());
} }
return myResource.data(); return myResource.data();

View file

@ -204,7 +204,7 @@ void NFrame::VideoUpdateFlash()
if (myTextFlashCounter == 16) // Flash rate = 0.5 * 60 / 16 Hz (as we need 2 changes for a period) if (myTextFlashCounter == 16) // Flash rate = 0.5 * 60 / 16 Hz (as we need 2 changes for a period)
{ {
myTextFlashCounter = 0; myTextFlashCounter = 0;
myTextFlashState = myTextFlashState; myTextFlashState = !myTextFlashState;
} }
} }

View file

@ -128,16 +128,16 @@ BYTE* QtFrame::GetResource(WORD id, LPCSTR lpType, DWORD expectedSize)
QFile res(QString::fromStdString(path)); QFile res(QString::fromStdString(path));
if (res.exists() && res.open(QIODevice::ReadOnly)) if (res.exists() && res.open(QIODevice::ReadOnly))
{ {
QByteArray resource = res.readAll(); QByteArray resource = res.readAll();
if (resource.size() == expectedSize) if (resource.size() == expectedSize)
{ {
std::swap(myResource, resource); std::swap(myResource, resource);
} }
} }
if (myResource.isEmpty()) if (myResource.isEmpty())
{ {
LogFileOutput("FindResource: could not load resource %s\n", filename); LogFileOutput("FindResource: could not load resource %s\n", filename.c_str());
} }
return reinterpret_cast<BYTE *>(myResource.data()); return reinterpret_cast<BYTE *>(myResource.data());