summaryrefslogtreecommitdiff
path: root/src/resources/wallpaper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/wallpaper.cpp')
-rw-r--r--src/resources/wallpaper.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index 5f5cc29a..727ccced 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -103,12 +103,10 @@ void Wallpaper::loadWallpapers()
// First, get the base filename of the image:
std::string filename = *i;
- unsigned int separator = filename.rfind("_");
- filename = filename.substr(0, separator);
+ filename = filename.substr(0, filename.rfind("_"));
// Check that the base filename doesn't have any '%' markers.
- separator = filename.find("%");
- if (separator == std::string::npos)
+ if (filename.find("%") == std::string::npos)
{
// Then, append the width and height search mask.
filename.append("_%dx%d.png");