summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-09-18 01:41:46 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-09-18 01:41:46 +0000
commit982233834722bbd719c5afb5e9ea79a7d7981a15 (patch)
tree9e0ba15486469a08563c2beaff821db32392b6f0 /src/graphics.cpp
parente020ca5e7f7878fb98d678e1dff180004dc27a9d (diff)
downloadmana-982233834722bbd719c5afb5e9ea79a7d7981a15.tar.gz
mana-982233834722bbd719c5afb5e9ea79a7d7981a15.tar.bz2
mana-982233834722bbd719c5afb5e9ea79a7d7981a15.tar.xz
mana-982233834722bbd719c5afb5e9ea79a7d7981a15.zip
Some minor optimizations.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index d5036699..f179eff2 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -251,8 +251,7 @@ bool Graphics::saveScreenshot()
std::stringstream pictureFilename;
// Write it under user home dir on *nices.
#ifdef __USE_UNIX98
- pictureFilename << PHYSFS_getUserDir();
- pictureFilename << "/";
+ pictureFilename << PHYSFS_getUserDir() << "/";
#endif
pictureFilename << "TMW_Screenshot_" << screenshotsCount << ".png";
@@ -266,8 +265,7 @@ bool Graphics::saveScreenshot()
screenshotsCount++;
pictureFilename.str("");
#ifdef __USE_UNIX98
- pictureFilename << PHYSFS_getUserDir();
- pictureFilename << "/";
+ pictureFilename << PHYSFS_getUserDir() << "/";
#endif
pictureFilename << "TMW_Screenshot_" << screenshotsCount << ".png";
testExists.open(std::string(pictureFilename.str()).c_str(), std::ios::in);
@@ -276,12 +274,12 @@ bool Graphics::saveScreenshot()
if ( ImageWriter::writePNG(getScreenshot(), pictureFilename.str()) )
{
- screenshotsCount++;
- return true;
+ screenshotsCount++;
+ return true;
}
else
{
- return false;
+ return false;
}
}