Removing the unnecessary local variables

actorid
Alexander "Ace" Olofsson 12 years ago
parent 97f1be2b05
commit cd3e780614

@ -44,7 +44,6 @@ LinuxPath::LinuxPath(const std::string& application_name)
boost::filesystem::path LinuxPath::getUserPath() const
{
boost::filesystem::path userPath(".");
boost::filesystem::path suffix(mName);
const char* theDir = getenv("HOME");
if (theDir == NULL)
@ -62,15 +61,12 @@ boost::filesystem::path LinuxPath::getUserPath() const
userPath = boost::filesystem::path(theDir);
}
userPath /= suffix;
return userPath;
return userPath / mName;
}
boost::filesystem::path LinuxPath::getCachePath() const
{
boost::filesystem::path userPath(".");
boost::filesystem::path suffix(mName);
const char* theDir = getenv("HOME");
if (theDir == NULL)
@ -86,9 +82,9 @@ boost::filesystem::path LinuxPath::getCachePath() const
{
userPath = boost::filesystem::path(theDir);
}
userPath /= ".cache" / suffix;
userPath /= ".cache";
return userPath;
return userPath / mName;
}
boost::filesystem::path LinuxPath::getGlobalPath() const

@ -47,7 +47,6 @@ MacOsPath::MacOsPath(const std::string& application_name)
boost::filesystem::path MacOsPath::getUserPath() const
{
boost::filesystem::path userPath(".");
boost::filesystem::path suffix(mName);
const char* theDir = getenv("HOME");
if (theDir == NULL)
@ -63,9 +62,7 @@ boost::filesystem::path MacOsPath::getUserPath() const
userPath = boost::filesystem::path(theDir) / "Library/Preferences/";
}
userPath /= suffix;
return userPath;
return userPath / mName;
}
boost::filesystem::path MacOsPath::getGlobalPath() const

@ -28,7 +28,6 @@ WindowsPath::WindowsPath(const std::string& application_name)
boost::filesystem::path WindowsPath::getUserPath() const
{
boost::filesystem::path userPath(".");
boost::filesystem::path suffix(mName);
TCHAR path[MAX_PATH];
memset(path, 0, sizeof(path));
@ -39,15 +38,12 @@ boost::filesystem::path WindowsPath::getUserPath() const
userPath = boost::filesystem::path(path);
}
userPath /= suffix;
return userPath;
return userPath / mName;
}
boost::filesystem::path WindowsPath::getGlobalPath() const
{
boost::filesystem::path globalPath(".");
boost::filesystem::path suffix(mName);
TCHAR path[MAX_PATH];
memset(path, 0, sizeof(path));
@ -57,9 +53,7 @@ boost::filesystem::path WindowsPath::getGlobalPath() const
globalPath = boost::filesystem::path(path);
}
globalPath /= suffix;
return globalPath;
return globalPath / mName;
}
boost::filesystem::path WindowsPath::getLocalPath() const

Loading…
Cancel
Save