From bdec92381ef60cd027292ed63e254e8de70028d9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 14 Feb 2017 20:34:06 +0300 Subject: In virtfs replace parameters type from char* to std::string. --- src/resources/wallpaper.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/resources/wallpaper.cpp') 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"); -- cgit v1.2.3-70-g09d2