1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Fix multiple MSVC warnings

This commit is contained in:
Martin Tůma 2023-02-25 11:06:14 +01:00
parent 6e2c0472c6
commit 108444d29b
3 changed files with 7 additions and 4 deletions

View File

@ -45,7 +45,7 @@ static void setAreaProperties(Area &area, const QJsonValue &properties)
if (o["fill-opacity"].isDouble())
fillColor.setAlphaF(o["fill-opacity"].toDouble());
else
fillColor.setAlphaF(0.6);
fillColor.setAlphaF(0.6f);
}
area.setStyle(PolygonStyle(fillColor, strokeColor, strokeWidth));

View File

@ -21,7 +21,7 @@ bool HuffmanText::decode(const SubFile *file, SubFile::Handle &hdl,
quint32 sym;
while (hs.readSymbol(sym)) {
for (quint32 i = 0; i < (_table.symbolBits() >> 3); i++) {
for (int i = 0; i < (_table.symbolBits() >> 3); i++) {
str.append((quint8)sym);
if (((quint8)sym == '\0'))
return true;

View File

@ -24,7 +24,7 @@ public:
if (!subFile)
return;
_data.resize(1U<<subFile->blockBits());
_data.resize(subFile->blockSize());
_file.setFileName(subFile->fileName());
_file.open(QIODevice::ReadOnly | QIODevice::Unbuffered);
}
@ -144,7 +144,10 @@ public:
bool readVBitfield32(Handle &hdl, quint32 &bitfield) const;
const QString &fileName() const {return _path ? *_path : _img->fileName();}
unsigned blockBits() const {return _path ? BLOCK_BITS : _img->blockBits();}
int blockSize() const
{
return _path ? 1U<<BLOCK_BITS : 1U<<_img->blockBits();
}
protected:
quint32 _gmpOffset;