summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-26 13:57:32 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-26 13:57:32 +0300
commit27b760f3aa52b4ba9c4fd7e565343b35c1281755 (patch)
treebfd2a51b5fe0c5d62cff5557de47302436c25420
parenta2971c05237aabe5b3d4027c7b6c2ffada6e9607 (diff)
downloadplus-27b760f3aa52b4ba9c4fd7e565343b35c1281755.tar.gz
plus-27b760f3aa52b4ba9c4fd7e565343b35c1281755.tar.bz2
plus-27b760f3aa52b4ba9c4fd7e565343b35c1281755.tar.xz
plus-27b760f3aa52b4ba9c4fd7e565343b35c1281755.zip
add restrict into loginhandler.
-rw-r--r--src/net/eathena/loginhandler.cpp15
-rw-r--r--src/net/eathena/loginhandler.h13
-rw-r--r--src/net/loginhandler.h7
-rw-r--r--src/net/tmwa/loginhandler.cpp14
-rw-r--r--src/net/tmwa/loginhandler.h13
5 files changed, 35 insertions, 27 deletions
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index a19a859ec..75040edd5 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -118,18 +118,21 @@ 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 A_UNUSED) const
+void LoginHandler::sendLoginRegister(const std::string &restrict username,
+ const std::string &restrict password,
+ const std::string &restrict email
+ A_UNUSED) const
{
MessageOut outMsg(0x0064);
outMsg.writeInt32(0); // client version
diff --git a/src/net/eathena/loginhandler.h b/src/net/eathena/loginhandler.h
index d8556af63..541c00771 100644
--- a/src/net/eathena/loginhandler.h
+++ b/src/net/eathena/loginhandler.h
@@ -57,9 +57,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;
@@ -71,9 +71,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 EAthena
diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h
index 229e9a4c6..481103c34 100644
--- a/src/net/loginhandler.h
+++ b/src/net/loginhandler.h
@@ -88,9 +88,10 @@ class LoginHandler
virtual void changeEmail(const std::string &email) const = 0;
- virtual void changePassword(const std::string &username,
- const std::string &oldPassword,
- const std::string &newPassword) const = 0;
+ virtual void changePassword(const std::string &restrict username,
+ const std::string &restrict oldPassword,
+ const std::string &restrict newPassword)
+ const = 0;
virtual void chooseServer(unsigned int server) const = 0;
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