summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-10-18 23:50:32 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-10-18 23:50:32 +0200
commit38ddcb52e24f027b0feb766fb5e31c3e5d87d89e (patch)
tree869d477dc5d54b0c3c0650f8bae340d76d55e8a4
parent11d3cb218027e63135bd3f65c2e0b6a565c69913 (diff)
downloadmanaserv-38ddcb52e24f027b0feb766fb5e31c3e5d87d89e.tar.gz
manaserv-38ddcb52e24f027b0feb766fb5e31c3e5d87d89e.tar.bz2
manaserv-38ddcb52e24f027b0feb766fb5e31c3e5d87d89e.tar.xz
manaserv-38ddcb52e24f027b0feb766fb5e31c3e5d87d89e.zip
Some random cleanups
-rw-r--r--src/account-server/accountclient.hpp4
-rw-r--r--src/account-server/accounthandler.cpp2
-rw-r--r--src/game-server/character.cpp2
-rw-r--r--src/game-server/main-game.cpp2
-rw-r--r--src/net/connection.hpp1
-rw-r--r--src/net/connectionhandler.cpp2
-rw-r--r--src/net/connectionhandler.hpp2
-rw-r--r--src/net/netcomputer.hpp1
8 files changed, 7 insertions, 9 deletions
diff --git a/src/account-server/accountclient.hpp b/src/account-server/accountclient.hpp
index 43f8c629..303627a0 100644
--- a/src/account-server/accountclient.hpp
+++ b/src/account-server/accountclient.hpp
@@ -29,7 +29,7 @@
class AccountHandler;
-enum
+enum AccountClientStatus
{
CLIENT_LOGIN = 0,
CLIENT_CONNECTED,
@@ -68,7 +68,7 @@ class AccountClient : public NetComputer
Account *getAccount() const
{ return mAccount; }
- int status;
+ AccountClientStatus status;
private:
/** Account associated with connection */
diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp
index b7124181..39539941 100644
--- a/src/account-server/accounthandler.cpp
+++ b/src/account-server/accounthandler.cpp
@@ -216,7 +216,7 @@ void AccountHandler::handleLoginMessage(AccountClient &client, MessageIn &msg)
const unsigned maxClients =
(unsigned) Configuration::getValue("net_maxClients", 1000);
- if (getClientNumber() >= maxClients)
+ if (getClientCount() >= maxClients)
{
reply.writeByte(ERRMSG_SERVER_FULL);
client.send(reply);
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index 89249022..94bd7465 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -504,7 +504,7 @@ void Character::recalculateLevel()
std::map<int, int>::const_iterator a;
for (a = getSkillBegin(); a != getSkillEnd(); a++)
{
- // Only use the first 1000 skill levels in calulation
+ // Only use the first 1000 skill levels in calculation
if (a->first < 1000)
{
float expGot = getExpGot(a->first);
diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp
index 076fd05e..5933671f 100644
--- a/src/game-server/main-game.cpp
+++ b/src/game-server/main-game.cpp
@@ -182,7 +182,7 @@ void initialize()
// Set enet to quit on exit.
atexit(enet_deinitialize);
- // Pre-calulate the needed trigomic function values
+ // Pre-calculate the needed trigomic function values
utils::math::init();
// Initialize the processor utility functions
diff --git a/src/net/connection.hpp b/src/net/connection.hpp
index 2beeb04a..c7eb9737 100644
--- a/src/net/connection.hpp
+++ b/src/net/connection.hpp
@@ -27,7 +27,6 @@
class MessageIn;
class MessageOut;
-class BandwidthMonitor;
/**
* A point-to-point connection to a remote host. The remote host can use a
diff --git a/src/net/connectionhandler.cpp b/src/net/connectionhandler.cpp
index 1f98b046..ef37f3d8 100644
--- a/src/net/connectionhandler.cpp
+++ b/src/net/connectionhandler.cpp
@@ -147,7 +147,7 @@ void ConnectionHandler::sendToEveryone(const MessageOut &msg)
}
}
-unsigned int ConnectionHandler::getClientNumber()
+unsigned int ConnectionHandler::getClientCount() const
{
return clients.size();
}
diff --git a/src/net/connectionhandler.hpp b/src/net/connectionhandler.hpp
index 8c8ecf40..0b8d3002 100644
--- a/src/net/connectionhandler.hpp
+++ b/src/net/connectionhandler.hpp
@@ -80,7 +80,7 @@ class ConnectionHandler
/**
* Return the number of connected clients.
*/
- unsigned int getClientNumber();
+ unsigned int getClientCount() const;
private:
ENetAddress address; /**< Includes the port to listen to. */
diff --git a/src/net/netcomputer.hpp b/src/net/netcomputer.hpp
index 10ffe5ae..1724d293 100644
--- a/src/net/netcomputer.hpp
+++ b/src/net/netcomputer.hpp
@@ -26,7 +26,6 @@
#include <enet/enet.h>
class MessageOut;
-class BandwidthMonitor;
/**
* This class represents a known computer on the network. For example a