diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-05 10:13:15 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-06 21:49:14 +0000 |
commit | 3ce39d2b497ab5356290a22b324181386af51c51 (patch) | |
tree | 1b923b8be7e4d2ce8ff70768dc7fff596487935c /src/net/tmwa/charserverhandler.cpp | |
parent | a9df89bda908e3b3d443db7f3ca865b6f12c75e5 (diff) | |
download | mana-3ce39d2b497ab5356290a22b324181386af51c51.tar.gz mana-3ce39d2b497ab5356290a22b324181386af51c51.tar.bz2 mana-3ce39d2b497ab5356290a22b324181386af51c51.tar.xz mana-3ce39d2b497ab5356290a22b324181386af51c51.zip |
General code cleanups
* Use final for all message handlers, Client, LocalPlayer,
Being::getType, Being::setPosition and Being::setMap.
(avoids some warnings about virtual dispatch in constructors)
* Use auto in more places
* Use emplace_back instead of push_back in some places
* Use default member initializers
* Less else after return
* Removed superfluous .c_str()
* Removed type aliases that are only used once
* Removed more unused includes
Diffstat (limited to 'src/net/tmwa/charserverhandler.cpp')
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index d6b1f5a0..636b58ce 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -74,7 +74,7 @@ void CharServerHandler::handleMessage(MessageIn &msg) { switch (msg.getId()) { - case SMSG_CHAR_LOGIN: + case SMSG_CHAR_LOGIN: { msg.skip(2); // Length word msg.skip(20); // Unused @@ -280,12 +280,12 @@ void CharServerHandler::setCharCreateDialog(CharCreateDialog *window) return; std::vector<std::string> attributes; - attributes.push_back(_("Strength:")); - attributes.push_back(_("Agility:")); - attributes.push_back(_("Vitality:")); - attributes.push_back(_("Intelligence:")); - attributes.push_back(_("Dexterity:")); - attributes.push_back(_("Luck:")); + attributes.emplace_back(_("Strength:")); + attributes.emplace_back(_("Agility:")); + attributes.emplace_back(_("Vitality:")); + attributes.emplace_back(_("Intelligence:")); + attributes.emplace_back(_("Dexterity:")); + attributes.emplace_back(_("Luck:")); const Token &token = static_cast<LoginHandler*>(Net::getLoginHandler())->getToken(); |