Silence clang-tidy warnings

This commit is contained in:
Martin Tůma 2025-01-12 10:37:21 +01:00
parent affb818f4e
commit cb4919d5bd
2 changed files with 2 additions and 7 deletions

View File

@ -11,7 +11,7 @@
struct CTX struct CTX
{ {
CTX(const QByteArray &ba) CTX(const QByteArray &ba)
: bp(ba.constData()), be(bp + ba.size()) {} : bp(ba.constData()), be(bp + ba.size()), tag(0) {}
const char *bp; const char *bp;
const char *be; const char *be;

View File

@ -22,6 +22,7 @@ static QImage sdf2img(const QImage &sdf, const QColor &color)
} }
Sprites::Sprite::Sprite(const QJsonObject &json) Sprites::Sprite::Sprite(const QJsonObject &json)
: _pixelRatio(1.0), _sdf(false)
{ {
int x, y, width, height; int x, y, width, height;
@ -44,16 +45,10 @@ Sprites::Sprite::Sprite(const QJsonObject &json)
_rect = QRect(x, y, width, height); _rect = QRect(x, y, width, height);
if (json.contains("pixelRatio") && json["pixelRatio"].isDouble()) if (json.contains("pixelRatio") && json["pixelRatio"].isDouble())
_pixelRatio = json["pixelRatio"].toDouble(); _pixelRatio = json["pixelRatio"].toDouble();
else
_pixelRatio = 1.0;
if (json.contains("sdf") && json["sdf"].isBool()) if (json.contains("sdf") && json["sdf"].isBool())
_sdf = json["sdf"].toBool(); _sdf = json["sdf"].toBool();
else
_sdf = false;
} }
bool Sprites::load(const QString &jsonFile, const QString &imageFile) bool Sprites::load(const QString &jsonFile, const QString &imageFile)