summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/dye.cpp2
-rw-r--r--src/resources/mapreader.cpp6
-rw-r--r--src/resources/wallpaper.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp
index 7d92e12ce..2d621127b 100644
--- a/src/resources/dye.cpp
+++ b/src/resources/dye.cpp
@@ -161,7 +161,7 @@ void DyePalette::getColor(int intensity, int color[3]) const
void DyePalette::getColor(double intensity, int color[3]) const
{
// Nothing to do here
- if (mColors.size() == 0)
+ if (mColors.empty())
return;
// Force range
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index d66e2dbe3..d930bf083 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -197,7 +197,8 @@ Map *MapReader::readMap(const std::string &filename,
unsigned char *inflated;
unsigned int inflatedSize;
- if (realFilename.find(".gz", realFilename.length() - 3) != std::string::npos)
+ if (realFilename.find(".gz", realFilename.length() - 3)
+ != std::string::npos)
{
// Inflate the gzipped map data
inflatedSize = inflateMemory(static_cast<unsigned char*>(buffer),
@@ -232,7 +233,8 @@ Map *MapReader::readMap(const std::string &filename,
}
else
{
- logger->log("Error while parsing map file (%s)!", realFilename.c_str());
+ logger->log("Error while parsing map file (%s)!",
+ realFilename.c_str());
}
if (map)
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index 936e72ca0..a2e3861e9 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -154,7 +154,7 @@ std::string Wallpaper::getWallpaper(int width, int height)
if (!wallPaperVector.empty())
{
// If we've got more than one occurence of a valid wallpaper...
- if (wallPaperVector.size() > 0)
+ if (!wallPaperVector.empty())
{
// Return randomly a wallpaper between vector[0] and
// vector[vector.size() - 1]