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, 5 insertions, 4 deletions
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp
index ad0df223..8a0a67ab 100644
--- a/src/gui/char_server.cpp
+++ b/src/gui/char_server.cpp
@@ -23,6 +23,8 @@
#include "char_server.h"
+#include <sstream>
+
#include "button.h"
#include "listbox.h"
#include "scrollarea.h"
@@ -33,8 +35,6 @@
#include "../net/network.h" // TODO this is just for iptostring, move that?
-#include "../utils/tostring.h"
-
extern SERVER_INFO **server_info;
/**
@@ -120,6 +120,7 @@ ServerListModel::getNumberOfElements()
std::string
ServerListModel::getElementAt(int i)
{
- const SERVER_INFO *si = server_info[i];
- return si->name + " (" + toString(si->online_users) + ")";
+ std::stringstream s;
+ s << server_info[i]->name << " (" << server_info[i]->online_users << ")";
+ return s.str();
}