From 27b760f3aa52b4ba9c4fd7e565343b35c1281755 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 26 Dec 2013 13:57:32 +0300 Subject: add restrict into loginhandler. --- src/net/tmwa/loginhandler.cpp | 14 ++++++++------ src/net/tmwa/loginhandler.h | 13 +++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index 4fe225de6..99708df60 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -125,18 +125,20 @@ void LoginHandler::disconnect() mNetwork->disconnect(); } -void LoginHandler::changePassword(const std::string &username A_UNUSED, - const std::string &oldPassword, - const std::string &newPassword) const +void LoginHandler::changePassword(const std::string &restrict username + A_UNUSED, + const std::string &restrict oldPassword, + const std::string &restrict newPassword) + const { MessageOut outMsg(CMSG_CHAR_PASSWORD_CHANGE); outMsg.writeStringNoLog(oldPassword, 24); outMsg.writeStringNoLog(newPassword, 24); } -void LoginHandler::sendLoginRegister(const std::string &username, - const std::string &password, - const std::string &email) const +void LoginHandler::sendLoginRegister(const std::string &restrict username, + const std::string &restrict password, + const std::string &restrict email) const { if (email.empty()) { diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h index 8eabcfe56..5f8a52af2 100644 --- a/src/net/tmwa/loginhandler.h +++ b/src/net/tmwa/loginhandler.h @@ -54,9 +54,9 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler unsigned int getMaxPasswordLength() const override final A_WARN_UNUSED { return 24; } - void changePassword(const std::string &username, - const std::string &oldPassword, - const std::string &newPassword) + void changePassword(const std::string &restrict username, + const std::string &restrict oldPassword, + const std::string &restrict newPassword) const override final; ServerInfo *getCharServer() const override final A_WARN_UNUSED; @@ -68,9 +68,10 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler void processUpdateHost2(Net::MessageIn &msg) const; private: - void sendLoginRegister(const std::string &username, - const std::string &password, - const std::string &email) const override final; + void sendLoginRegister(const std::string &restrict username, + const std::string &restrict password, + const std::string &restrict email) + const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2