diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-09-18 01:41:46 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-09-18 01:41:46 +0000 |
commit | 982233834722bbd719c5afb5e9ea79a7d7981a15 (patch) | |
tree | 9e0ba15486469a08563c2beaff821db32392b6f0 /src | |
parent | e020ca5e7f7878fb98d678e1dff180004dc27a9d (diff) | |
download | mana-client-982233834722bbd719c5afb5e9ea79a7d7981a15.tar.gz mana-client-982233834722bbd719c5afb5e9ea79a7d7981a15.tar.bz2 mana-client-982233834722bbd719c5afb5e9ea79a7d7981a15.tar.xz mana-client-982233834722bbd719c5afb5e9ea79a7d7981a15.zip |
Some minor optimizations.
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics.cpp | 12 |
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; } } |