Fix a few issues reported by clang.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
0b692ee7f8
commit
4ae655caab
3 changed files with 8 additions and 8 deletions
|
@ -99,7 +99,7 @@ BYTE* CommonFrame::GetResource(WORD id, LPCSTR lpType, DWORD expectedSize)
|
|||
|
||||
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();
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
myTextFlashCounter = 0;
|
||||
myTextFlashState = myTextFlashState;
|
||||
myTextFlashState = !myTextFlashState;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -128,16 +128,16 @@ BYTE* QtFrame::GetResource(WORD id, LPCSTR lpType, DWORD expectedSize)
|
|||
QFile res(QString::fromStdString(path));
|
||||
if (res.exists() && res.open(QIODevice::ReadOnly))
|
||||
{
|
||||
QByteArray resource = res.readAll();
|
||||
if (resource.size() == expectedSize)
|
||||
{
|
||||
std::swap(myResource, resource);
|
||||
}
|
||||
QByteArray resource = res.readAll();
|
||||
if (resource.size() == expectedSize)
|
||||
{
|
||||
std::swap(myResource, resource);
|
||||
}
|
||||
}
|
||||
|
||||
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());
|
||||
|
|
Loading…
Add table
Reference in a new issue