summaryrefslogtreecommitdiff
path: root/src/gui/updatewindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/updatewindow.cpp')
-rw-r--r--src/gui/updatewindow.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index 4f43d1fc..9db09f27 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -24,6 +24,7 @@
#include "updatewindow.h"
#include <iostream>
+#include <sstream>
#include <SDL.h>
#include <SDL_thread.h>
@@ -40,8 +41,6 @@
#include "../log.h"
#include "../main.h"
-#include "../utils/tostring.h"
-
UpdaterWindow::UpdaterWindow():
Window("Updating..."),
mThread(NULL), mMutex(NULL), mDownloadStatus(UPDATE_NEWS),
@@ -191,8 +190,10 @@ int UpdaterWindow::updateProgress(void *ptr,
if (progress < 0) progress = 0.0f;
if (progress > 1) progress = 1.0f;
- uw->setLabel(
- uw->mCurrentFile + " (" + toString((int)progress * 100) + "%)");
+ std::stringstream progressString;
+ progressString << uw->mCurrentFile
+ << " (" << ((int)(progress * 100)) << "%)";
+ uw->setLabel(progressString.str().c_str());
uw->setProgress(progress);
if (state != UPDATE_STATE || uw->mDownloadStatus == UPDATE_ERROR)