summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Schwarzer <[email protected]>2016-04-24 12:21:59 +0200
committerFrederik Schwarzer <[email protected]>2016-04-24 12:21:59 +0200
commit6b5ff76f86843ae5d3366a6d26e136c4da01cc4e (patch)
treeda170ed010bac6758f423029a2c3aeff5de3895a
parentf4b0a2ee5193a1f600af2cdb4bab75ce523f95c3 (diff)
Be explicit.
-rw-r--r--kmahjonggbackground.cpp2
-rw-r--r--kmahjonggbackgroundselector.cpp2
-rw-r--r--kmahjonggtileset.cpp2
-rw-r--r--kmahjonggtilesetselector.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/kmahjonggbackground.cpp b/kmahjonggbackground.cpp
index 498a9f7..f04bdb8 100644
--- a/kmahjonggbackground.cpp
+++ b/kmahjonggbackground.cpp
@@ -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;
diff --git a/kmahjonggbackgroundselector.cpp b/kmahjonggbackgroundselector.cpp
index 3008efe..fe13f6f 100644
--- a/kmahjonggbackgroundselector.cpp
+++ b/kmahjonggbackgroundselector.cpp
@@ -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()) {
diff --git a/kmahjonggtileset.cpp b/kmahjonggtileset.cpp
index 36ea302..0653127 100644
--- a/kmahjonggtileset.cpp
+++ b/kmahjonggtileset.cpp
@@ -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) {
diff --git a/kmahjonggtilesetselector.cpp b/kmahjonggtilesetselector.cpp
index e62cfcf..a103f22 100644
--- a/kmahjonggtilesetselector.cpp
+++ b/kmahjonggtilesetselector.cpp
@@ -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()) {