Commit f2c76cbe authored by Frederik Schwarzer's avatar Frederik Schwarzer

Remove parens around simple return statements.

parent aa524b1d
......@@ -108,7 +108,7 @@ bool KMahjonggBackground::load(const QString & file, short width, short height)
// verify if it is a valid file first and if we can open it
QFile bgfile(file);
if (!bgfile.open(QIODevice::ReadOnly)) {
return (false);
return false;
}
bgfile.close();
......@@ -144,7 +144,7 @@ bool KMahjonggBackground::load(const QString & file, short width, short height)
qCDebug(LIBKMAHJONGG_LOG) << "Using background at" << d->graphicspath;
if (d->graphicspath.isEmpty()) {
return (false);
return false;
}
if (group.readEntry("Tiled", 0) != 0) {
......@@ -164,7 +164,7 @@ bool KMahjonggBackground::load(const QString & file, short width, short height)
bool KMahjonggBackground::loadGraphics()
{
if (d->graphicsLoaded || d->isPlain) {
return (true);
return true;
}
d->svg.load(d->graphicspath);
......@@ -172,9 +172,9 @@ bool KMahjonggBackground::loadGraphics()
d->isSVG = true;
} else {
//qCDebug(LIBKMAHJONGG_LOG) << "could not load svg";
return (false);
return false;
}
return (true);
return true;
}
void KMahjonggBackground::sizeChanged(int newW, int newH)
......
......@@ -203,7 +203,7 @@ bool KMahjonggTileset::loadTileset(const QString & tilesetPath)
// verify if it is a valid file first and if we can open it
QFile tilesetfile(tilesetPath);
if (!tilesetfile.open(QIODevice::ReadOnly)) {
return (false);
return false;
}
tilesetfile.close();
......@@ -230,7 +230,7 @@ bool KMahjonggTileset::loadTileset(const QString & tilesetPath)
//only SVG for now
d->isSVG = true;
if (d->graphicspath.isEmpty()) {
return (false);
return false;
}
d->originaldata.w = group.readEntry("TileWidth", 30);
......@@ -244,14 +244,14 @@ bool KMahjonggTileset::loadTileset(const QString & tilesetPath)
d->graphicsLoaded = false;
d->filename = tilesetPath;
return (true);
return true;
}
// ---------------------------------------------------------
bool KMahjonggTileset::loadGraphics()
{
if (d->graphicsLoaded) {
return (true);
return true;
}
if (d->isSVG) {
//really?
......@@ -262,14 +262,14 @@ bool KMahjonggTileset::loadGraphics()
d->graphicsLoaded = true;
reloadTileset(QSize(d->originaldata.w, d->originaldata.h));
} else {
return (false);
return false;
}
} else {
//TODO add support for png??
return false;
}
return (true);
return true;
}
// ---------------------------------------------------------
......@@ -284,14 +284,14 @@ bool KMahjonggTileset::reloadTileset(const QSize & newTilesize)
updateScaleInfo(newTilesize.width(), newTilesize.height());
//rendering will be done when needed, automatically using the global cache
} else {
return (false);
return false;
}
} else {
//TODO add support for png???
return false;
}
return (true);
return true;
}
void KMahjonggTileset::buildElementIdTable()
......
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