summaryrefslogtreecommitdiffstats
path: root/src/app/system_linux.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-05-26 17:47:54 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2013-05-27 10:19:16 +0200
commit8765d58b02c9afd00186bae4a0045dff32f7d102 (patch)
tree884cd72d4b8b2fabbd109001412e315aa908b0e8 /src/app/system_linux.cpp
parent538745a731d07facd7a1574c04a5d34d23ce3bfa (diff)
downloadcolobot-8765d58b02c9afd00186bae4a0045dff32f7d102.tar.gz
colobot-8765d58b02c9afd00186bae4a0045dff32f7d102.tar.bz2
colobot-8765d58b02c9afd00186bae4a0045dff32f7d102.zip
Fixed code formatting
* moved braces to new lines * fixed some function/variable names * fixed whitespace issues
Diffstat (limited to 'src/app/system_linux.cpp')
-rw-r--r--src/app/system_linux.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/app/system_linux.cpp b/src/app/system_linux.cpp
index 01dd850..492af7d 100644
--- a/src/app/system_linux.cpp
+++ b/src/app/system_linux.cpp
@@ -95,9 +95,9 @@ long long CSystemUtilsLinux::TimeStampExactDiff(SystemTimeStamp *before, SystemT
(after->clockTime.tv_sec - before->clockTime.tv_sec) * 1000000000ll;
}
-std::string CSystemUtilsLinux::profileFileLocation()
+std::string CSystemUtilsLinux::GetProfileFileLocation()
{
- std::string m_profileFile;
+ std::string profileFile;
// Determine profileFile according to XDG Base Directory Specification
char* envXDG_CONFIG_HOME = getenv("XDG_CONFIG_HOME");
@@ -106,25 +106,25 @@ std::string CSystemUtilsLinux::profileFileLocation()
char *envHOME = getenv("HOME");
if (envHOME == NULL)
{
- m_profileFile = "colobot.ini";
+ profileFile = "colobot.ini";
}
else
{
- m_profileFile = std::string(envHOME) + "/.config/colobot.ini";
+ profileFile = std::string(envHOME) + "/.config/colobot.ini";
}
}
else
{
- m_profileFile = std::string(envXDG_CONFIG_HOME) + "/colobot.ini";
+ profileFile = std::string(envXDG_CONFIG_HOME) + "/colobot.ini";
}
- GetLogger()->Trace("Profile configuration is %s\n", m_profileFile.c_str());
+ GetLogger()->Trace("Profile configuration is %s\n", profileFile.c_str());
- return m_profileFile;
+ return profileFile;
}
-std::string CSystemUtilsLinux::savegameDirectoryLocation()
+std::string CSystemUtilsLinux::GetSavegameDirectoryLocation()
{
- std::string m_savegameDir;
+ std::string savegameDir;
// Determine savegame dir according to XDG Base Directory Specification
char *envXDG_DATA_HOME = getenv("XDG_CONFIG_DATA");
@@ -133,18 +133,19 @@ std::string CSystemUtilsLinux::savegameDirectoryLocation()
char *envHOME = getenv("HOME");
if (envHOME == NULL)
{
- m_savegameDir = "/tmp/colobot-savegame";
+ savegameDir = "/tmp/colobot-savegame";
}
else
- {
- m_savegameDir = std::string(envHOME) + "/.local/share/colobot";
+ {
+ savegameDir = std::string(envHOME) + "/.local/share/colobot";
}
}
else
{
- m_savegameDir = std::string(envXDG_DATA_HOME) + "/colobot";
+ savegameDir = std::string(envXDG_DATA_HOME) + "/colobot";
}
- GetLogger()->Trace("Saved game files are going to %s\n", m_savegameDir.c_str());
+ GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str());
- return m_savegameDir;
+ return savegameDir;
}
+