diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-01-09 13:23:43 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-01-09 13:23:43 +0100 |
commit | 16074a7c2c8197a061281a6880ddbc3967d8ea0c (patch) | |
tree | bd0cc650944aaeb38e87d43b94e43c1ab94bb2c7 /src/chat-server | |
parent | 562b403a66a6a96d883620b27455564d50e3d49b (diff) | |
download | manaserv-16074a7c2c8197a061281a6880ddbc3967d8ea0c.tar.gz manaserv-16074a7c2c8197a061281a6880ddbc3967d8ea0c.tar.xz manaserv-16074a7c2c8197a061281a6880ddbc3967d8ea0c.zip |
Replaced 'unsigned int' with 'unsigned'
Same thing, but shorter.
Diffstat (limited to 'src/chat-server')
-rw-r--r-- | src/chat-server/chatclient.h | 2 | ||||
-rw-r--r-- | src/chat-server/chathandler.h | 2 | ||||
-rw-r--r-- | src/chat-server/guildhandler.cpp | 2 | ||||
-rw-r--r-- | src/chat-server/party.h | 6 | ||||
-rw-r--r-- | src/chat-server/post.cpp | 8 | ||||
-rw-r--r-- | src/chat-server/post.h | 10 |
6 files changed, 15 insertions, 15 deletions
diff --git a/src/chat-server/chatclient.h b/src/chat-server/chatclient.h index a0812a3..7e8c4e2 100644 --- a/src/chat-server/chatclient.h +++ b/src/chat-server/chatclient.h @@ -46,7 +46,7 @@ class ChatClient : public NetComputer } std::string characterName; - unsigned int characterId; + unsigned characterId; std::vector<ChatChannel *> channels; std::vector<Guild *> guilds; Party *party; diff --git a/src/chat-server/chathandler.h b/src/chat-server/chathandler.h index 06d7251..1a96cfb 100644 --- a/src/chat-server/chathandler.h +++ b/src/chat-server/chathandler.h @@ -214,7 +214,7 @@ class ChatHandler : public ConnectionHandler * Finds out the name of a character by its id. Either searches it * in the list of online characters or otherwise gets it from the db. */ - unsigned int getIdOfChar(const std::string &name); + unsigned getIdOfChar(const std::string &name); /** * Sends a message to every client in a registered channel. diff --git a/src/chat-server/guildhandler.cpp b/src/chat-server/guildhandler.cpp index 949728c..1bbe367 100644 --- a/src/chat-server/guildhandler.cpp +++ b/src/chat-server/guildhandler.cpp @@ -350,7 +350,7 @@ void ChatHandler::handleGuildKickMember(ChatClient &client, MessageIn &msg) return; } ChatClient *otherClient = getClient(otherCharName); - unsigned int otherCharId; + unsigned otherCharId; if (otherClient) otherCharId = otherClient->characterId; else diff --git a/src/chat-server/party.h b/src/chat-server/party.h index da8755b..18bec58 100644 --- a/src/chat-server/party.h +++ b/src/chat-server/party.h @@ -48,19 +48,19 @@ public: /** * Return number of users in party */ - unsigned int userCount() const { return mUsers.size(); } + unsigned userCount() const { return mUsers.size(); } /** * Return the party id */ - unsigned int getId() const { return mId; } + unsigned getId() const { return mId; } const PartyUsers &getUsers() const { return mUsers; } private: PartyUsers mUsers; - unsigned int mId; + unsigned mId; }; #endif diff --git a/src/chat-server/post.cpp b/src/chat-server/post.cpp index eff5ddb..dc1e0d1 100644 --- a/src/chat-server/post.cpp +++ b/src/chat-server/post.cpp @@ -23,7 +23,7 @@ #include "../account-server/character.h" #include "../common/configuration.h" -Letter::Letter(unsigned int type, Character *sender, Character *receiver) +Letter::Letter(unsigned type, Character *sender, Character *receiver) : mId(0), mType(type), mSender(sender), mReceiver(receiver) { } @@ -59,7 +59,7 @@ std::string Letter::getContents() const bool Letter::addAttachment(InventoryItem item) { - unsigned int max = Configuration::getValue("mail_maxAttachments", 3); + unsigned max = Configuration::getValue("mail_maxAttachments", 3); if (mAttachments.size() > max) { return false; @@ -100,7 +100,7 @@ Post::~Post() bool Post::addLetter(Letter *letter) { - unsigned int max = Configuration::getValue("mail_maxLetters", 10); + unsigned max = Configuration::getValue("mail_maxLetters", 10); if (mLetters.size() > max) { return false; @@ -120,7 +120,7 @@ Letter* Post::getLetter(int letter) const return mLetters[letter]; } -unsigned int Post::getNumberOfLetters() const +unsigned Post::getNumberOfLetters() const { return mLetters.size(); } diff --git a/src/chat-server/post.h b/src/chat-server/post.h index c8006fa..2d0b2ae 100644 --- a/src/chat-server/post.h +++ b/src/chat-server/post.h @@ -42,7 +42,7 @@ public: * @param sender Pointer to character that sent the letter * @param receiver Pointer to character that will receive the letter */ - Letter(unsigned int type, Character *sender, Character *receiver); + Letter(unsigned type, Character *sender, Character *receiver); ~Letter(); @@ -62,7 +62,7 @@ public: /** * Gets the type of the letter. (unused) */ - unsigned int getType() const + unsigned getType() const { return mType; } /** @@ -113,8 +113,8 @@ public: std::vector<InventoryItem> getAttachments() const; private: - unsigned int mId; - unsigned int mType; + unsigned mId; + unsigned mType; unsigned long mExpiry; std::string mContents; std::vector<InventoryItem> mAttachments; @@ -143,7 +143,7 @@ public: * Return number of letters in post * @return Returns the size of mLetters */ - unsigned int getNumberOfLetters() const; + unsigned getNumberOfLetters() const; private: std::vector<Letter*> mLetters; |