Commit 6b5ff76f authored by Frederik Schwarzer's avatar Frederik Schwarzer

Be explicit.

parent f4b0a2ee
......@@ -147,7 +147,7 @@ bool KMahjonggBackground::load(const QString & file, short width, short height)
return (false);
}
if (group.readEntry("Tiled", 0)) {
if (group.readEntry("Tiled", 0) != 0) {
d->w = group.readEntry("Width", 0);
d->h = group.readEntry("Height", 0);
d->isTiled = true;
......
......@@ -90,7 +90,7 @@ void KMahjonggBackgroundSelector::backgroundChanged()
{
KMahjonggBackground * selBG = backgroundMap.value(backgroundList->currentItem()->text());
//Sanity checkings. Should not happen.
if (!selBG) {
if (selBG == nullptr) {
return;
}
if (selBG->path() == kcfg_Background->text()) {
......
......@@ -250,7 +250,7 @@ bool KMahjonggTileset::loadTileset(const QString & tilesetPath)
// ---------------------------------------------------------
bool KMahjonggTileset::loadGraphics()
{
if (d->graphicsLoaded == true) {
if (d->graphicsLoaded) {
return (true);
}
if (d->isSVG) {
......
......@@ -92,7 +92,7 @@ void KMahjonggTilesetSelector::tilesetChanged()
{
KMahjonggTileset * selTileset = tilesetMap.value(tilesetList->currentItem()->text());
//Sanity checkings. Should not happen.
if (!selTileset) {
if (selTileset == nullptr) {
return;
}
if (selTileset->path() == kcfg_TileSet->text()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment