diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-18 14:47:14 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-18 14:47:14 +0000 |
commit | ab678324e3d73e2354cef331624ecef7cfc03203 (patch) | |
tree | 29394a5aca6e59f817f7cfa3b9281891a273d259 /src/gui/updatewindow.cpp | |
parent | 32badd4b6f843cb74fdc3238fe92119518c8c0ab (diff) | |
download | mana-ab678324e3d73e2354cef331624ecef7cfc03203.tar.gz mana-ab678324e3d73e2354cef331624ecef7cfc03203.tar.bz2 mana-ab678324e3d73e2354cef331624ecef7cfc03203.tar.xz mana-ab678324e3d73e2354cef331624ecef7cfc03203.zip |
Added a toString conversion function.
Diffstat (limited to 'src/gui/updatewindow.cpp')
-rw-r--r-- | src/gui/updatewindow.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index 9db09f27..4f43d1fc 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -24,7 +24,6 @@ #include "updatewindow.h" #include <iostream> -#include <sstream> #include <SDL.h> #include <SDL_thread.h> @@ -41,6 +40,8 @@ #include "../log.h" #include "../main.h" +#include "../utils/tostring.h" + UpdaterWindow::UpdaterWindow(): Window("Updating..."), mThread(NULL), mMutex(NULL), mDownloadStatus(UPDATE_NEWS), @@ -190,10 +191,8 @@ int UpdaterWindow::updateProgress(void *ptr, if (progress < 0) progress = 0.0f; if (progress > 1) progress = 1.0f; - std::stringstream progressString; - progressString << uw->mCurrentFile - << " (" << ((int)(progress * 100)) << "%)"; - uw->setLabel(progressString.str().c_str()); + uw->setLabel( + uw->mCurrentFile + " (" + toString((int)progress * 100) + "%)"); uw->setProgress(progress); if (state != UPDATE_STATE || uw->mDownloadStatus == UPDATE_ERROR) |