summaryrefslogtreecommitdiff
path: root/src/resources/wallpaper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-14 20:34:06 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-14 20:59:26 +0300
commitbdec92381ef60cd027292ed63e254e8de70028d9 (patch)
treeebf2722cdc9fe7383a709ba1584432a491cf10ba /src/resources/wallpaper.cpp
parent5283a59db971ec2038149bf26ad9b3cbc4924449 (diff)
downloadmv-bdec92381ef60cd027292ed63e254e8de70028d9.tar.gz
mv-bdec92381ef60cd027292ed63e254e8de70028d9.tar.bz2
mv-bdec92381ef60cd027292ed63e254e8de70028d9.tar.xz
mv-bdec92381ef60cd027292ed63e254e8de70028d9.zip
In virtfs replace parameters type from char* to std::string.
Diffstat (limited to 'src/resources/wallpaper.cpp')
-rw-r--r--src/resources/wallpaper.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index 63a8d755c..397f29af5 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -55,21 +55,21 @@ static void initDefaultWallpaperPaths()
// Init the path
wallpaperPath = branding.getStringValue("wallpapersPath");
- if (wallpaperPath.empty() || !VirtFs::isDirectory(wallpaperPath.c_str()))
+ if (wallpaperPath.empty() || !VirtFs::isDirectory(wallpaperPath))
wallpaperPath = paths.getValue("wallpapers", "");
- if (wallpaperPath.empty() || !VirtFs::isDirectory(wallpaperPath.c_str()))
+ if (wallpaperPath.empty() || !VirtFs::isDirectory(wallpaperPath))
wallpaperPath = "graphics/images/";
// Init the default file
wallpaperFile = branding.getStringValue("wallpaperFile");
- if (!wallpaperFile.empty() && !VirtFs::isDirectory(wallpaperFile.c_str()))
+ if (!wallpaperFile.empty() && !VirtFs::isDirectory(wallpaperFile))
return;
else
wallpaperFile = paths.getValue("wallpaperFile", "");
- if (wallpaperFile.empty() || VirtFs::isDirectory(wallpaperFile.c_str()))
+ if (wallpaperFile.empty() || VirtFs::isDirectory(wallpaperFile))
wallpaperFile = "login_wallpaper.png";
}
@@ -91,6 +91,7 @@ void Wallpaper::loadWallpapers()
{
// First, get the base filename of the image:
std::string filename = *i;
+ const std::string name = filename;
// If the backup file is found, we tell it.
if (filename.find(wallpaperFile) != std::string::npos)
haveBackup = true;
@@ -105,7 +106,6 @@ void Wallpaper::loadWallpapers()
separator = filename.find('%');
if (separator == std::string::npos)
{
- std::string name = filename;
// Then, append the width and height search mask.
filename.append("_%10dx%10d.png");