diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-26 00:01:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-26 00:01:56 +0300 |
commit | 803b6afd00b0e3574b40b866f21a0d3d01f6dc4d (patch) | |
tree | 8a55ef881f1eaac4d216b3f5d2c4605eb520070d /src/gui/worldselectdialog.cpp | |
parent | 8478d540748edccf36dc9bda5f0c3de0aa7bf763 (diff) | |
download | manaverse-803b6afd00b0e3574b40b866f21a0d3d01f6dc4d.tar.gz manaverse-803b6afd00b0e3574b40b866f21a0d3d01f6dc4d.tar.bz2 manaverse-803b6afd00b0e3574b40b866f21a0d3d01f6dc4d.tar.xz manaverse-803b6afd00b0e3574b40b866f21a0d3d01f6dc4d.zip |
Improve string usage in other files.
Diffstat (limited to 'src/gui/worldselectdialog.cpp')
-rw-r--r-- | src/gui/worldselectdialog.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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; |