summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-04 16:58:20 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-04 16:58:20 +0000
commitce849af300a70425b574b724c62dc9f5fce6016b (patch)
tree2e5cc9fb5d5fda6a7fba4ffc87fa012de23da745
parent0d189c79a2d3be98e176987e6aca15fd2c618ef0 (diff)
downloadmanaserv-ce849af300a70425b574b724c62dc9f5fce6016b.tar.gz
manaserv-ce849af300a70425b574b724c62dc9f5fce6016b.tar.bz2
manaserv-ce849af300a70425b574b724c62dc9f5fce6016b.tar.xz
manaserv-ce849af300a70425b574b724c62dc9f5fce6016b.zip
Generalized the properties functionality as was done in the client before.
Removed some more remaining usages of tmwserv namespace. Added some documentation and de-complicized the code a bit. Removed checks for SDL and SDL_net.
-rw-r--r--ChangeLog13
-rw-r--r--INSTALL16
-rw-r--r--configure.ac9
-rw-r--r--src/Makefile.am1
-rw-r--r--src/accounthandler.cpp5
-rw-r--r--src/chatchannel.h6
-rw-r--r--src/gamehandler.cpp75
-rw-r--r--src/items.cpp2
-rw-r--r--src/items.h5
-rw-r--r--src/main.cpp33
-rw-r--r--src/map.cpp25
-rw-r--r--src/map.h25
-rw-r--r--src/properties.h77
-rw-r--r--src/utils/logger.h34
-rw-r--r--src/utils/timer.cpp3
-rw-r--r--src/utils/timer.h3
16 files changed, 192 insertions, 140 deletions
diff --git a/ChangeLog b/ChangeLog
index 60fcafb8..e02acad5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-08-04 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/properties.h, src/map.cpp, src/map.h, src/Makefile.am:
+ Generalized the properties functionality as was done in the client
+ before.
+ * src/main.cpp, src/items.cpp, src/items.h, src/utils/timer.cpp,
+ src/utils/timer.h, src/utils/logger.h: Removed some more remaining
+ usages of tmwserv namespace.
+ * src/gamehandler.cpp, src/chatchannel.h: Added some documentation and
+ de-complicized the code a bit.
+ * configure.ac: Removed checks for SDL and SDL_net.
+ * INSTALL: Somehow got updated to a newer version.
+
2006-08-04 Guillaume Melquiond <guillaume.melquiond@gmail.com>
* src/object.h, src/object.cpp, src/being.h, src/dalstorage.cpp: Added
diff --git a/INSTALL b/INSTALL
index 56b077d6..23e5f25d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -102,16 +102,16 @@ for another architecture.
Installation Names
==================
-By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc. You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PREFIX'.
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
-give `configure' the option `--exec-prefix=PREFIX', the package will
-use PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
@@ -159,7 +159,7 @@ where SYSTEM can have one of these forms:
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
-use the `--target=TYPE' option to select the type of system they will
+use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
diff --git a/configure.ac b/configure.ac
index 13504d55..5dc70cfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,9 +23,6 @@ AC_MSG_ERROR([ *** Unable to find libcrypto library]))
AC_CHECK_LIB([physfs], [PHYSFS_init], ,
AC_MSG_ERROR([ *** Unable to find PhysFS library (icculus.org/physfs/)]))
-AC_CHECK_LIB([SDL_net], [SDLNet_Init], ,
-AC_MSG_ERROR([ *** Unable to find SDL_net library]))
-
AC_CHECK_LIB([enet], [enet_initialize], ,
AC_MSG_ERROR([ *** Unable to find enet library (enet.bespin.org)]))
@@ -33,12 +30,6 @@ PKG_CHECK_MODULES(XML2, [libxml-2.0 >= 2.4])
CXXFLAGS="$CXXFLAGS $XML2_CFLAGS"
LIBS="$LIBS $XML2_LIBS"
-AC_CHECK_LIB_TMW([SDL], [1.2.0])
-# update CXXFLAGS and LIBS.
-# SDL_CFLAGS and SDL_LIBS are set by AC_CHECK_LIB_TMW.
-CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
-LIBS="$LIBS $SDL_LIBS"
-
# Checks for header files.
AC_HEADER_STDC
diff --git a/src/Makefile.am b/src/Makefile.am
index 7b04c953..5aedb6b2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,6 +32,7 @@ tmwserv_SOURCES = main.cpp \
gameclient.cpp \
gamehandler.h \
gamehandler.cpp \
+ properties.h \
state.h \
state.cpp \
debug.h \
diff --git a/src/accounthandler.cpp b/src/accounthandler.cpp
index 992f7888..271186c0 100644
--- a/src/accounthandler.cpp
+++ b/src/accounthandler.cpp
@@ -426,7 +426,10 @@ void AccountHandler::processMessage(NetComputer *comp, MessageIn &message)
break; // no character selected
}
std::string magic_token(32, ' ');
- for(int i = 0; i < 32; ++i) magic_token[i] = 1 + (int) (127 * (rand() / (RAND_MAX + 1.0)));
+ for (int i = 0; i < 32; ++i) {
+ magic_token[i] =
+ 1 + (int) (127 * (rand() / (RAND_MAX + 1.0)));
+ }
result.writeByte(ERRMSG_OK);
result.writeString("localhost");
result.writeShort(9603);
diff --git a/src/chatchannel.h b/src/chatchannel.h
index f46b1dae..5571701e 100644
--- a/src/chatchannel.h
+++ b/src/chatchannel.h
@@ -97,17 +97,17 @@ class ChatChannel {
private:
/**
- * The Channel's name
+ * The Channel's name.
*/
std::string mChannelName;
/**
- * The Channel's name
+ * The Channel's announcement.
*/
std::string mChannelAnnouncement;
/**
- * The Channel's name
+ * The Channel's password.
*/
std::string mChannelPassword;
diff --git a/src/gamehandler.cpp b/src/gamehandler.cpp
index ef0ed924..b3dfb324 100644
--- a/src/gamehandler.cpp
+++ b/src/gamehandler.cpp
@@ -41,11 +41,29 @@ struct GamePendingLogin
};
typedef std::map< std::string, GamePendingLogin > GamePendingLogins;
+typedef std::map< std::string, GameClient * > GamePendingClients;
+
+/**
+ * The pending logins represent clients who were given a magic token by the
+ * account server but who have not yet logged in to the game server.
+ */
static GamePendingLogins pendingLogins;
-typedef std::map< std::string, GameClient * > GamePendingClients;
+/**
+ * The pending clients represent clients who tried to login to the game server,
+ * but for which no magic token is available yet. This can happen when the
+ * communication between the account server and client went faster than the
+ * communication between the account server and the game server.
+ */
static GamePendingClients pendingClients;
+/**
+ * Notification that a particular token has been given to allow a certain
+ * player to enter the game.
+ *
+ * This method is currently called directly from the account server. Later on
+ * it should be a message sent from the account server to the game server.
+ */
void registerGameClient(std::string const &token, PlayerPtr ch)
{
GamePendingClients::iterator i = pendingClients.find(token);
@@ -70,11 +88,17 @@ void registerGameClient(std::string const &token, PlayerPtr ch)
void GameHandler::removeOutdatedPending()
{
- GamePendingLogins::iterator i = pendingLogins.begin(), next;
+ GamePendingLogins::iterator i = pendingLogins.begin();
+ GamePendingLogins::iterator next;
+
while (i != pendingLogins.end())
{
- next = i; ++next;
- if (--i->second.timeout <= 0) pendingLogins.erase(i);
+ next = i;
+ ++next;
+ if (--i->second.timeout <= 0)
+ {
+ pendingLogins.erase(i);
+ }
i = next;
}
}
@@ -86,8 +110,8 @@ NetComputer *GameHandler::computerConnected(ENetPeer *peer)
void GameHandler::computerDisconnected(NetComputer *computer)
{
- for (GamePendingClients::iterator i = pendingClients.begin(), i_end = pendingClients.end();
- i != i_end; ++i)
+ GamePendingClients::iterator i;
+ for (i = pendingClients.begin(); i != pendingClients.end(); ++i)
{
if (i->second == computer)
{
@@ -115,8 +139,9 @@ void GameHandler::processMessage(NetComputer *comp, MessageIn &message)
GamePendingLogins::iterator i = pendingLogins.find(magic_token);
if (i == pendingLogins.end())
{
- for (GamePendingClients::iterator i = pendingClients.begin(), i_end = pendingClients.end();
- i != i_end; ++i) {
+ GamePendingClients::iterator i;
+ for (i = pendingClients.begin(); i != pendingClients.end(); ++i)
+ {
if (i->second == &computer) return;
}
pendingClients.insert(std::make_pair(magic_token, &computer));
@@ -202,30 +227,44 @@ void GameHandler::processMessage(NetComputer *comp, MessageIn &message)
void GameHandler::sayAround(GameClient &computer, std::string const &text)
{
PlayerPtr beingPtr = computer.getCharacter();
- MessageOut msg;
- msg.writeShort(GPMSG_SAY);
+
+ MessageOut msg(GPMSG_SAY);
msg.writeString(beingPtr->getName());
msg.writeString(text);
+
unsigned speakerMapId = beingPtr->getMapId();
std::pair<unsigned, unsigned> speakerXY = beingPtr->getXY();
+
for (NetComputers::iterator i = clients.begin(), i_end = clients.end();
i != i_end; ++i)
{
// See if the other being is near enough, then send the message
- Player const *listener = static_cast< GameClient * >(*i)->getCharacter().get();
- if (!listener || listener->getMapId() != speakerMapId) continue;
+ Player const *listener =
+ static_cast<GameClient *>(*i)->getCharacter().get();
+
+ if (!listener || listener->getMapId() != speakerMapId) {
+ continue;
+ }
+
std::pair<unsigned, unsigned> listenerXY = listener->getXY();
- if (abs(listenerXY.first - speakerXY.first ) > (int)AROUND_AREA_IN_TILES) continue;
- if (abs(listenerXY.second - speakerXY.second) > (int)AROUND_AREA_IN_TILES) continue;
- (*i)->send(msg.getPacket());
+
+ if (abs(listenerXY.first - speakerXY.first) <=
+ (int)AROUND_AREA_IN_TILES &&
+ abs(listenerXY.second - speakerXY.second) <=
+ (int)AROUND_AREA_IN_TILES)
+ {
+ (*i)->send(msg.getPacket());
+ }
}
}
void GameHandler::sendTo(PlayerPtr beingPtr, MessageOut &msg)
{
- for (NetComputers::iterator i = clients.begin(), i_end = clients.end();
- i != i_end; ++i) {
- if (static_cast< GameClient * >(*i)->getCharacter().get() == beingPtr.get()) {
+ for (NetComputers::iterator i = clients.begin(); i != clients.end(); ++i)
+ {
+ PlayerPtr clientChar = static_cast<GameClient *>(*i)->getCharacter();
+ if (clientChar.get() == beingPtr.get())
+ {
(*i)->send(msg.getPacket());
break;
}
diff --git a/src/items.cpp b/src/items.cpp
index e0606920..659e24db 100644
--- a/src/items.cpp
+++ b/src/items.cpp
@@ -23,7 +23,7 @@
#include "items.h"
-void tmwserv::Item::use()
+void Item::use()
{
//
}
diff --git a/src/items.h b/src/items.h
index 0d8aefcc..1b973566 100644
--- a/src/items.h
+++ b/src/items.h
@@ -26,9 +26,6 @@
#include "object.h"
-namespace tmwserv
-{
-
/**
* Class for all types of in-game items.
*/
@@ -59,6 +56,4 @@ class Item : public Object
unsigned int getType() { return type; }
};
-} // namespace tmwserv
-
#endif
diff --git a/src/main.cpp b/src/main.cpp
index 28afc187..24bf79af 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -78,7 +78,7 @@ std::string scriptLanugage = "none";
#define DEFAULT_SERVER_PORT 9601
#endif
-tmwserv::utils::Timer worldTimer(100, false); /**< Timer for world tics set to 100 ms */
+utils::Timer worldTimer(100, false); /**< Timer for world tics set to 100 ms */
int worldTime = 0; /**< Current world time in 100ms ticks */
bool running = true; /**< Determines if server keeps running */
@@ -157,7 +157,7 @@ void initialize()
// Initialize the global handlers
// FIXME: Make the global handlers global vars or part of a bigger
- // singleton or a local vatiable in the event-loop
+ // singleton or a local variable in the event-loop
chatChannelManager = new ChatChannelManager();
chatHandler = new ChatHandler();
@@ -167,28 +167,28 @@ void initialize()
// Reset to default segmentation fault handling for debugging purposes
signal(SIGSEGV, SIG_DFL);
- // set enet to quit on exit.
+ // Set enet to quit on exit.
atexit(enet_deinitialize);
- // initialize enet.
+ // Initialize enet.
if (enet_initialize() != 0) {
LOG_FATAL("An error occurred while initializing ENet", 0);
exit(2);
}
- // initialize scripting subsystem.
+ // Initialize scripting subsystem.
#ifdef RUBY_SUPPORT
LOG_INFO("Script Language: " << scriptLanguage, 0);
- // initialize ruby
+ // Initialize ruby
ruby_init();
ruby_init_loadpath();
ruby_script("tmw");
- // initialize bindings
+ // Initialize bindings
Init_Tmw();
- // run test script
+ // Run test script
rb_load_file("scripts/init.rb");
rubyStatus = ruby_exec();
#else
@@ -205,7 +205,7 @@ void initialize()
LOG_WARN("No Database Backend Support.", 0);
#endif
- // initialize configuration defaults
+ // Initialize configuration defaults
config.setValue("dbuser", "");
config.setValue("dbpass", "");
config.setValue("dbhost", "");
@@ -236,7 +236,7 @@ void deinitialize()
ruby_cleanup(rubyStatus);
#endif
- // destroy message handlers
+ // Destroy message handlers
delete accountHandler;
delete chatHandler;
delete gameHandler;
@@ -331,20 +331,17 @@ int main(int argc, char *argv[])
return 3;
}
- using namespace tmwserv;
-
- // create storage wrapper
+ // Create storage wrapper
Storage& store = Storage::instance("tmw");
store.setUser(config.getValue("dbuser", ""));
store.setPassword(config.getValue("dbpass", ""));
store.close();
store.open();
- //
- // create state machine
+ // Create state machine
gameState = new State;
- // initialize world timer
+ // Initialize world timer
worldTimer.start();
while (running) {
@@ -354,7 +351,9 @@ int main(int argc, char *argv[])
if (elapsedWorldTicks > 1)
{
- LOG_WARN(elapsedWorldTicks -1 <<" World Tick(s) skipped because of insufficient time. please buy a faster machine ;-)", 0);
+ LOG_WARN(elapsedWorldTicks -1 << " World Tick(s) skipped "
+ "because of insufficient time. please buy a faster "
+ "machine ;-)", 0);
};
// Print world time at 10 second intervals to show we're alive
diff --git a/src/map.cpp b/src/map.cpp
index 436a9c42..89c34ee6 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -147,31 +147,6 @@ Map::getTileHeight()
return tileHeight;
}
-std::string
-Map::getProperty(const std::string &name)
-{
- std::map<std::string,std::string>::iterator i = properties.find(name);
-
- if (i != properties.end())
- {
- return (*i).second;
- }
-
- return "";
-}
-
-bool
-Map::hasProperty(const std::string &name)
-{
- return (properties.find(name) != properties.end());
-}
-
-void
-Map::setProperty(const std::string &name, const std::string &value)
-{
- properties[name] = value;
-}
-
std::list<PATH_NODE>
Map::findPath(int startX, int startY, int destX, int destY)
{
diff --git a/src/map.h b/src/map.h
index 0f31d7b4..9cc07044 100644
--- a/src/map.h
+++ b/src/map.h
@@ -28,6 +28,8 @@
#include <map>
#include <string>
+#include "properties.h"
+
struct PATH_NODE;
/**
@@ -76,7 +78,7 @@ class Location
/**
* A tile map.
*/
-class Map
+class Map : public Properties
{
public:
/**
@@ -155,27 +157,6 @@ class Map
findPath(int startX, int startY,
int destX, int destY);
- /**
- * Get a map property.
- *
- * @return the value of the given property or an empty string when it
- * doesn't exist.
- */
- std::string
- getProperty(const std::string &name);
-
- /**
- * Returns whether a certain property is available.
- */
- bool
- hasProperty(const std::string &name);
-
- /**
- * Set a map property.
- */
- void
- setProperty(const std::string &name, const std::string &value);
-
private:
int width, height;
int tileWidth, tileHeight;
diff --git a/src/properties.h b/src/properties.h
new file mode 100644
index 00000000..5f8d751d
--- /dev/null
+++ b/src/properties.h
@@ -0,0 +1,77 @@
+/*
+ * The Mana World
+ * Copyright 2004 The Mana World Development Team
+ *
+ * This file is part of The Mana World.
+ *
+ * The Mana World is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * The Mana World is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with The Mana World; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * $Id$
+ */
+
+#ifndef _TMW_PROPERTIES_H_
+#define _TMW_PROPERTIES_H_
+
+#include <map>
+#include <string>
+
+/**
+ * A class holding a set of properties.
+ */
+class Properties
+{
+ public:
+ virtual
+ ~Properties() {}
+
+ /**
+ * Get a map property.
+ *
+ * @return the value of the given property or an empty string when it
+ * doesn't exist.
+ */
+ const std::string&
+ getProperty(const std::string &name)
+ {
+ const static std::string undefined = "";
+ PropertyMap::const_iterator i = mProperties.find(name);
+
+ return (i != mProperties.end()) ? i->second : undefined;
+ }
+
+ /**
+ * Returns whether a certain property is available.
+ */
+ bool
+ hasProperty(const std::string &name)
+ {
+ return mProperties.find(name) != mProperties.end();
+ }
+
+ /**
+ * Set a map property.
+ */
+ void
+ setProperty(const std::string &name, const std::string &value)
+ {
+ mProperties[name] = value;
+ }
+
+ private:
+ typedef std::map<std::string, std::string> PropertyMap;
+ PropertyMap mProperties;
+};
+
+#endif
diff --git a/src/utils/logger.h b/src/utils/logger.h
index e37f33af..6ce97a71 100644
--- a/src/utils/logger.h
+++ b/src/utils/logger.h
@@ -33,7 +33,6 @@
namespace utils
{
-
/**
* A very simple logger that writes messages to a log file.
* If the log file is not set, the messages are routed to the standard output
@@ -54,7 +53,7 @@ namespace utils
*
* int main(void)
* {
- * using namespace tmwserv::utils;
+ * using namespace utils;
*
* Logger& logger = Logger::instance();
* logger.setLogFile("/path/to/logfile");
@@ -88,7 +87,6 @@ class Logger: public Singleton<Logger>
// friend so that Singleton can call the constructor.
friend class Singleton<Logger>;
-
public:
/**
* Set the log file.
@@ -103,7 +101,6 @@ class Logger: public Singleton<Logger>
void
setLogFile(const std::string& logFile);
-
/**
* Add/remove the timestamp.
*
@@ -114,7 +111,6 @@ class Logger: public Singleton<Logger>
setTimestamp(bool flag = true)
throw();
-
/**
* Set tee mode.
*
@@ -134,7 +130,7 @@ class Logger: public Singleton<Logger>
* 2 = + Packets names and messages sent.
*/
void
- setVerbosity(unsigned short verbosity = 0) { mVerbosity = verbosity; };
+ setVerbosity(unsigned short verbosity = 0) { mVerbosity = verbosity; }
/**
* Set tee mode.
@@ -143,7 +139,7 @@ class Logger: public Singleton<Logger>
* output and the log file (if set) (default = true).
*/
unsigned short
- getVerbosity() { return mVerbosity; };
+ getVerbosity() { return mVerbosity; }
/**
* Log a generic message.
@@ -156,8 +152,7 @@ class Logger: public Singleton<Logger>
* @exception std::ios::failure.
*/
void
- log(const std::string& msg, unsigned short atVerbosity = 0);
-
+ log(const std::string &msg, unsigned short atVerbosity = 0);
/**
* Log a debug message.
@@ -170,8 +165,7 @@ class Logger: public Singleton<Logger>
* @exception std::ios::failure.
*/
void
- debug(const std::string& msg, unsigned short atVerbosity = 0);
-
+ debug(const std::string &msg, unsigned short atVerbosity = 0);
/**
* Log an info message.
@@ -184,8 +178,7 @@ class Logger: public Singleton<Logger>
* @exception std::ios::failure.
*/
void
- info(const std::string& msg, unsigned short atVerbosity = 0);
-
+ info(const std::string &msg, unsigned short atVerbosity = 0);
/**
* Log a warn message.
@@ -198,8 +191,7 @@ class Logger: public Singleton<Logger>
* @exception std::ios::failure.
*/
void
- warn(const std::string& msg, unsigned short atVerbosity = 0);
-
+ warn(const std::string &msg, unsigned short atVerbosity = 0);
/**
* Log an error message.
@@ -212,8 +204,7 @@ class Logger: public Singleton<Logger>
* @exception std::ios::failure.
*/
void
- error(const std::string& msg, unsigned short atVerbosity = 0);
-
+ error(const std::string &msg, unsigned short atVerbosity = 0);
/**
* Log a fatal error message.
@@ -226,8 +217,7 @@ class Logger: public Singleton<Logger>
* @exception std::ios::failure.
*/
void
- fatal(const std::string& msg, unsigned short atVerbosity = 0);
-
+ fatal(const std::string &msg, unsigned short atVerbosity = 0);
private:
/**
@@ -236,27 +226,23 @@ class Logger: public Singleton<Logger>
Logger(void)
throw();
-
/**
* Destructor.
*/
~Logger(void)
throw();
-
/**
* Copy constructor.
*/
Logger(const Logger& rhs);
-
/**
* Assignment operator.
*/
Logger&
operator=(const Logger& rhs);
-
/**
* Log a generic message.
*
@@ -271,7 +257,6 @@ class Logger: public Singleton<Logger>
const std::string& msg,
const std::string& prefix = "");
-
/**
* Get the current time.
*
@@ -281,7 +266,6 @@ class Logger: public Singleton<Logger>
getCurrentTime(void);
- private:
std::ofstream mLogFile; /**< the log file */
bool mHasTimestamp; /**< the timestamp flag */
bool mTeeMode; /**< the tee mode flag */
diff --git a/src/utils/timer.cpp b/src/utils/timer.cpp
index a476ebec..f055e664 100644
--- a/src/utils/timer.cpp
+++ b/src/utils/timer.cpp
@@ -22,8 +22,6 @@
#include <time.h>
#include "timer.h"
-namespace tmwserv
-{
namespace utils
{
@@ -87,4 +85,3 @@ uint64_t Timer::getTimeInMillisec()
};
} // ::utils
-} // ::tmwserv
diff --git a/src/utils/timer.h b/src/utils/timer.h
index 603d24cd..69ca634e 100644
--- a/src/utils/timer.h
+++ b/src/utils/timer.h
@@ -35,8 +35,6 @@
#include "wingettimeofday.h"
#endif
-namespace tmwserv
-{
namespace utils
{
@@ -99,6 +97,5 @@ class Timer
};
} // ::utils
-} // ::tmwserv
#endif