summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/tga/qtgafile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/imageformats/tga/qtgafile.cpp')
-rw-r--r--src/plugins/imageformats/tga/qtgafile.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/imageformats/tga/qtgafile.cpp b/src/plugins/imageformats/tga/qtgafile.cpp
index 14a7a74..e2f20a7 100644
--- a/src/plugins/imageformats/tga/qtgafile.cpp
+++ b/src/plugins/imageformats/tga/qtgafile.cpp
@@ -144,9 +144,7 @@ QTgaFile::QTgaFile(QIODevice *device)
mErrorMessage = tr("Seek file/device for image read failed");
return;
}
- int bytes = device->read((char*)mHeader, HeaderSize);
- if (bytes != HeaderSize)
- {
+ if (device->read(reinterpret_cast<char*>(mHeader), HeaderSize) != HeaderSize) {
mErrorMessage = tr("Image header read failed");
return;
}
@@ -170,9 +168,7 @@ QTgaFile::QTgaFile(QIODevice *device)
return;
}
char footer[FooterSize];
- bytes = mDevice->read((char*)footer, FooterSize);
- if (bytes != FooterSize)
- {
+ if (mDevice->read(reinterpret_cast<char*>(footer), FooterSize) != FooterSize) {
mErrorMessage = tr("Could not read footer");
}
if (qstrncmp(&footer[SignatureOffset], "TRUEVISION-XFILE", 16) != 0)