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/char_server.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/char_server.cpp')
-rw-r--r-- | src/gui/char_server.cpp | 9 |
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) + ")"; } |