diff --git a/src/map/IMG/huffmanbuffer.cpp b/src/map/IMG/huffmanbuffer.cpp index a53c687b..5568a2bf 100644 --- a/src/map/IMG/huffmanbuffer.cpp +++ b/src/map/IMG/huffmanbuffer.cpp @@ -16,5 +16,5 @@ bool HuffmanBuffer::load(const RGNFile *rgn, SubFile::Handle &rgnHdl) }; resize(recordSize); - return rgn->read(rgnHdl, (quint8*)data(), recordSize); + return rgn->read(rgnHdl, data(), recordSize); } diff --git a/src/map/IMG/lblfile.cpp b/src/map/IMG/lblfile.cpp index 0555aa3d..98a7f3d1 100644 --- a/src/map/IMG/lblfile.cpp +++ b/src/map/IMG/lblfile.cpp @@ -338,7 +338,7 @@ QImage LBLFile::readImage(Handle &hdl, quint32 id) const return QImage(); QByteArray ba; ba.resize(_rasters.at(id).size); - if (!read(hdl, (quint8*)ba.data(), _rasters.at(id).size)) + if (!read(hdl, ba.data(), _rasters.at(id).size)) return QImage(); return QImage::fromData(ba); diff --git a/src/map/IMG/subfile.cpp b/src/map/IMG/subfile.cpp index 61131f2c..177dea66 100644 --- a/src/map/IMG/subfile.cpp +++ b/src/map/IMG/subfile.cpp @@ -116,7 +116,7 @@ bool SubFile::readVBitfield32(Handle &hdl, quint32 &bitfield) const return true; } -bool SubFile::read(Handle &handle, quint8 *buff, quint32 size) const +bool SubFile::read(Handle &handle, char *buff, quint32 size) const { while (size) { quint32 remaining = handle._data.size() - handle._blockPos; diff --git a/src/map/IMG/subfile.h b/src/map/IMG/subfile.h index cc86ba63..0b67cf88 100644 --- a/src/map/IMG/subfile.h +++ b/src/map/IMG/subfile.h @@ -60,7 +60,7 @@ public: bool seek(Handle &handle, quint32 pos) const; quint32 pos(Handle &handle) const {return handle._pos;} - bool read(Handle &handle, quint8 *buff, quint32 size) const; + bool read(Handle &handle, char *buff, quint32 size) const; bool readByte(Handle &handle, quint8 *val) const {