summaryrefslogtreecommitdiff
path: root/src/gui/char_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/char_server.cpp')
-rw-r--r--src/gui/char_server.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp
index 8a0a67ab..ad0df223 100644
--- a/src/gui/char_server.cpp
+++ b/src/gui/char_server.cpp
@@ -23,8 +23,6 @@
#include "char_server.h"
-#include <sstream>
-
#include "button.h"
#include "listbox.h"
#include "scrollarea.h"
@@ -35,6 +33,8 @@
#include "../net/network.h" // TODO this is just for iptostring, move that?
+#include "../utils/tostring.h"
+
extern SERVER_INFO **server_info;
/**
@@ -120,7 +120,6 @@ ServerListModel::getNumberOfElements()
std::string
ServerListModel::getElementAt(int i)
{
- std::stringstream s;
- s << server_info[i]->name << " (" << server_info[i]->online_users << ")";
- return s.str();
+ const SERVER_INFO *si = server_info[i];
+ return si->name + " (" + toString(si->online_users) + ")";
}