From 37a7b026881ce23fb22ae66b32c8ef9695e8a0de Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 23 Mar 2007 00:38:23 +0000 Subject: Mostly fixed some compilation issues. --- src/abstractcharacterdata.hpp | 9 +++++++-- src/account-server/accountclient.cpp | 4 ++-- src/account-server/accounthandler.cpp | 4 +--- src/configuration.cpp | 3 --- src/game-server/being.cpp | 2 +- src/game-server/character.cpp | 2 +- src/game-server/character.hpp | 14 ++++++++++---- src/point.h | 14 ++++++++++---- src/utils/stringfilter.cpp | 2 +- 9 files changed, 33 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/abstractcharacterdata.hpp b/src/abstractcharacterdata.hpp index fd98c7e8..b3a4a908 100644 --- a/src/abstractcharacterdata.hpp +++ b/src/abstractcharacterdata.hpp @@ -61,6 +61,11 @@ struct InventoryItem class AbstractCharacterData { public: + /** + * Empty virtual destructor. + */ + virtual ~AbstractCharacterData() {} + /** * Stores data into a outgoing message. */ @@ -72,7 +77,7 @@ class AbstractCharacterData void deserialize(MessageIn &); protected: - /** + /* * Get and set methods */ @@ -156,7 +161,7 @@ class AbstractCharacterData virtual void setPosition(const Point &p) = 0; - /** + /* * The access functions for inventory */ diff --git a/src/account-server/accountclient.cpp b/src/account-server/accountclient.cpp index c17e95a8..383a809d 100644 --- a/src/account-server/accountclient.cpp +++ b/src/account-server/accountclient.cpp @@ -29,9 +29,9 @@ AccountClient::AccountClient(ENetPeer *peer): NetComputer(peer), + status(CLIENT_LOGIN), mAccountPtr(NULL), - mCharacterPtr(NULL), - status(CLIENT_LOGIN) + mCharacterPtr(NULL) { } diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp index 9d9949f3..52ea2b33 100644 --- a/src/account-server/accounthandler.cpp +++ b/src/account-server/accounthandler.cpp @@ -267,7 +267,7 @@ handleReconnectMessage(AccountClient &computer, MessageIn &msg) { if (computer.status != CLIENT_LOGIN) { - LOG_DEBUG("Account tried to reconnect, but was allready logged in " + LOG_DEBUG("Account tried to reconnect, but was already logged in " << "or queued."); return; } @@ -563,8 +563,6 @@ AccountHandler::handleCharacterCreateMessage(AccountClient &computer, for (int i = 0; i < NB_BASE_ATTRIBUTES; ++i) attributes[i] = msg.readShort(); - // We see if the difference between the lowest stat and the highest - // isn't too big. unsigned int totalAttributes = 0; bool validNonZeroAttributes = true; for (int i = 0; i < NB_BASE_ATTRIBUTES; ++i) diff --git a/src/configuration.cpp b/src/configuration.cpp index 819334f4..251d63a1 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -108,9 +108,6 @@ void Configuration::write() for (iter = options.begin(); iter != options.end(); iter++) { - // logger->log("Configuration::write(%s, \"%s\")", - // iter->first.c_str(), iter->second.c_str()); - xmlTextWriterStartElement(writer, BAD_CAST "option"); xmlTextWriterWriteAttribute(writer, BAD_CAST "name", BAD_CAST iter->first.c_str()); diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp index d3c151e7..87bcb0a3 100644 --- a/src/game-server/being.cpp +++ b/src/game-server/being.cpp @@ -206,4 +206,4 @@ WeaponStats Being::getWeaponStats() weaponStats.skill = 0; return weaponStats; -}; +} diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp index 4e09d791..e2d45666 100644 --- a/src/game-server/character.cpp +++ b/src/game-server/character.cpp @@ -124,7 +124,7 @@ Character::getWeaponStats() weaponStats.skill = CHAR_SKILL_WEAPON_UNARMED; return weaponStats; -}; +} void Character::writeAttributeUpdateMessage(MessageOut &msg) diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp index db93e5e7..4931624c 100644 --- a/src/game-server/character.hpp +++ b/src/game-server/character.hpp @@ -51,7 +51,7 @@ class Character : public Being, public AbstractCharacterData * Utility constructor for creating a Character from a received * characterdata message. */ - Character(MessageIn & msg); + Character(MessageIn &msg); /** * Updates the internal status. @@ -78,7 +78,7 @@ class Character : public Being, public AbstractCharacterData { return mPossessions; } - /** + /* * Character data: * Get and set methods */ @@ -262,8 +262,14 @@ class Character : public Being, public AbstractCharacterData GameClient *mClient; /**< Client computer. */ - std::vector mOldAttributes; /**< Atributes as the client should currently know them */ - bool attributesChanged; /**< true when one or more attributes might have changed since the client has been updated about them. */ + /** Atributes as the client should currently know them. */ + std::vector mOldAttributes; + + /** + * true when one or more attributes might have changed since the + * client has been updated about them. + */ + bool mAttributesChanged; int mDatabaseID; /**< Character's database ID. */ std::string mName; /**< Name of the character. */ diff --git a/src/point.h b/src/point.h index 6b694ef2..ddeffaae 100644 --- a/src/point.h +++ b/src/point.h @@ -31,8 +31,14 @@ class Point { public: - Point() { x = 0; y = 0; } - Point(unsigned short X, unsigned short Y) {x = X; y = Y; } + Point(): + x(0), y(0) + {} + + Point(unsigned short X, unsigned short Y): + x(X), y(Y) + {} + unsigned short x; /**< x coordinate */ unsigned short y; /**< y coordinate */ @@ -57,9 +63,9 @@ class Point }; /** - * A rectangle in positive space. Usually represents a pixel-based zone on a map. + * A rectangle in positive space. Usually represents a pixel-based zone on a + * map. */ - class Rectangle { public: diff --git a/src/utils/stringfilter.cpp b/src/utils/stringfilter.cpp index c08a9942..ba1f1b99 100644 --- a/src/utils/stringfilter.cpp +++ b/src/utils/stringfilter.cpp @@ -71,7 +71,7 @@ void StringFilter::writeSlangFilterList() ++i; if (i != mSlangs.end()) slangsList += ","; } - // mConfig->setValue("SlangsList", slangsList); + //mConfig->setValue("SlangsList", slangsList); } bool StringFilter::filterContent(const std::string& text) -- cgit v1.2.3-60-g2f50