From 803b6afd00b0e3574b40b866f21a0d3d01f6dc4d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Feb 2013 00:01:56 +0300 Subject: Improve string usage in other files. --- src/gui/worldselectdialog.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gui/worldselectdialog.cpp') diff --git a/src/gui/worldselectdialog.cpp b/src/gui/worldselectdialog.cpp index 93314ff16..b62311555 100644 --- a/src/gui/worldselectdialog.cpp +++ b/src/gui/worldselectdialog.cpp @@ -68,9 +68,14 @@ class WorldListModel final : public gcn::ListModel { const WorldInfo *const si = mWorlds[i]; if (si) - return si->name + " (" + toString(si->online_users) + ")"; + { + return std::string(si->name).append(" (").append( + toString(si->online_users)).append(")"); + } else + { return "???"; + } } private: Worlds mWorlds; -- cgit v1.2.3-70-g09d2