summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--src/chat-server/chatchannel.cpp2
-rw-r--r--src/dal/recordset.cpp7
-rw-r--r--src/game-server/command.cpp2
-rw-r--r--src/game-server/map.cpp5
-rw-r--r--src/game-server/mapreader.cpp2
-rw-r--r--src/game-server/quest.cpp41
-rw-r--r--src/game-server/resourcemanager.cpp3
-rw-r--r--src/net/connectionhandler.cpp5
-rw-r--r--src/net/messagein.cpp5
-rw-r--r--src/net/messageout.cpp7
-rw-r--r--src/scripting/script.cpp1
-rw-r--r--src/utils/stringfilter.cpp2
-rw-r--r--src/utils/zlib.cpp4
14 files changed, 63 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index d98556f0..7836aae8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-10-27 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/dal/recordset.cpp, src/utils/zlib.cpp, src/scripting/script.cpp,
+ src/utils/stringfilter.cpp, src/chat-server/chatchannel.cpp,
+ src/net/messagein.cpp, src/net/messageout.cpp, src/game-server/map.cpp,
+ src/net/connectionhandler.cpp, src/game-server/mapreader.cpp,
+ src/game-server/command.cpp, src/game-server/resourcemanager.cpp,
+ src/game-server/quest.cpp: Fixed missing dependencies and changed some
+ storage qualifiers, so that it compiles with GCC 4.3.
+
2007-10-18 Guillaume Melquiond <guillaume.melquiond@gmail.com>
* data/items.xml, data/monsters.xml: Superseded by client files.
diff --git a/src/chat-server/chatchannel.cpp b/src/chat-server/chatchannel.cpp
index 073a8028..87c2a173 100644
--- a/src/chat-server/chatchannel.cpp
+++ b/src/chat-server/chatchannel.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "chat-server/chatchannel.hpp"
#include "chat-server/chatclient.hpp"
diff --git a/src/dal/recordset.cpp b/src/dal/recordset.cpp
index 20bf2f12..19666e6d 100644
--- a/src/dal/recordset.cpp
+++ b/src/dal/recordset.cpp
@@ -20,12 +20,13 @@
* $Id$
*/
-#include "recordset.h"
-
+#include <algorithm>
#include <sstream>
#include <stdexcept>
-#include "dalexcept.h"
+#include "dal/recordset.h"
+
+#include "dal/dalexcept.h"
namespace dal
{
diff --git a/src/game-server/command.cpp b/src/game-server/command.cpp
index a77c2c02..cced1318 100644
--- a/src/game-server/command.cpp
+++ b/src/game-server/command.cpp
@@ -40,7 +40,7 @@ static T proxy_cast(intptr_t v)
{ return (T)v; }
template<>
-static std::string const &proxy_cast(intptr_t v)
+std::string const &proxy_cast(intptr_t v)
{ return *(std::string const *)v; }
template< typename T1 >
diff --git a/src/game-server/map.cpp b/src/game-server/map.cpp
index fc718918..3699b6da 100644
--- a/src/game-server/map.cpp
+++ b/src/game-server/map.cpp
@@ -21,10 +21,11 @@
* $Id$
*/
-#include "game-server/map.hpp"
-
+#include <algorithm>
#include <queue>
+#include "game-server/map.hpp"
+
MetaTile::MetaTile():
whichList(0)
{
diff --git a/src/game-server/mapreader.cpp b/src/game-server/mapreader.cpp
index f961efd2..24ed3796 100644
--- a/src/game-server/mapreader.cpp
+++ b/src/game-server/mapreader.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <cstring>
+
#include "game-server/mapreader.hpp"
#include "game-server/map.hpp"
diff --git a/src/game-server/quest.cpp b/src/game-server/quest.cpp
index 4b93407f..512bf39d 100644
--- a/src/game-server/quest.cpp
+++ b/src/game-server/quest.cpp
@@ -81,26 +81,9 @@ void setQuestVar(Character *ch, std::string const &name,
*/
struct QuestDeathListener: EventDispatch
{
- static void partialRemove(EventListener const *, Thing *t)
- {
- int id = static_cast< Character * >(t)->getDatabaseID();
- PendingVariables &variables = pendingQuests[id].variables;
- // Remove all the callbacks, but do not remove the variable names.
- for (PendingVariables::iterator i = variables.begin(),
- i_end = variables.end(); i != i_end; ++i)
- {
- i->second.clear();
- }
- // The listener is kept in case a fullRemove is needed later.
- }
+ static void partialRemove(EventListener const *, Thing *);
- static void fullRemove(EventListener const *, Character *ch)
- {
- extern EventListener questDeathListener;
- ch->removeListener(&questDeathListener);
- // Remove anything related to this character.
- pendingQuests.erase(ch->getDatabaseID());
- }
+ static void fullRemove(EventListener const *, Character *);
QuestDeathListener()
{
@@ -112,6 +95,26 @@ struct QuestDeathListener: EventDispatch
static QuestDeathListener questDeathDummy;
static EventListener questDeathListener(&questDeathDummy);
+void QuestDeathListener::partialRemove(EventListener const *, Thing *t)
+{
+ int id = static_cast< Character * >(t)->getDatabaseID();
+ PendingVariables &variables = pendingQuests[id].variables;
+ // Remove all the callbacks, but do not remove the variable names.
+ for (PendingVariables::iterator i = variables.begin(),
+ i_end = variables.end(); i != i_end; ++i)
+ {
+ i->second.clear();
+ }
+ // The listener is kept in case a fullRemove is needed later.
+}
+
+void QuestDeathListener::fullRemove(EventListener const *, Character *ch)
+{
+ ch->removeListener(&questDeathListener);
+ // Remove anything related to this character.
+ pendingQuests.erase(ch->getDatabaseID());
+}
+
void recoverQuestVar(Character *ch, std::string const &name,
QuestCallback const &f)
{
diff --git a/src/game-server/resourcemanager.cpp b/src/game-server/resourcemanager.cpp
index f274ded8..8816e8c0 100644
--- a/src/game-server/resourcemanager.cpp
+++ b/src/game-server/resourcemanager.cpp
@@ -21,6 +21,9 @@
* $Id$
*/
+#include <cstdlib>
+#include <cstring>
+
#ifdef _WIN32
#include <io.h>
#include <direct.h>
diff --git a/src/net/connectionhandler.cpp b/src/net/connectionhandler.cpp
index b7d3b692..3411c91e 100644
--- a/src/net/connectionhandler.cpp
+++ b/src/net/connectionhandler.cpp
@@ -20,8 +20,11 @@
* $Id$
*/
-#include "defines.h"
+#include <algorithm>
+
#include "net/connectionhandler.hpp"
+
+#include "defines.h"
#include "net/messagein.hpp"
#include "net/messageout.hpp"
#include "net/netcomputer.hpp"
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index bf43478b..d57fc5ab 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -21,9 +21,10 @@
* $Id$
*/
-#include <string>
-#include <iostream>
+#include <cstring>
#include <iomanip>
+#include <iostream>
+#include <string>
#include <enet/enet.h>
#include "net/messagein.hpp"
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp
index 7753d9d3..e31020e8 100644
--- a/src/net/messageout.cpp
+++ b/src/net/messageout.cpp
@@ -21,11 +21,10 @@
* $Id$
*/
-#include <cstdlib>
-#include <iosfwd>
-#include <string>
-#include <iostream>
+#include <cstring>
#include <iomanip>
+#include <iostream>
+#include <string>
#include <enet/enet.h>
#include "net/messageout.hpp"
diff --git a/src/scripting/script.cpp b/src/scripting/script.cpp
index 59faaf62..0ebc2b4a 100644
--- a/src/scripting/script.cpp
+++ b/src/scripting/script.cpp
@@ -21,6 +21,7 @@
* $Id$
*/
+#include <cstdlib>
#include <map>
#include "scripting/script.hpp"
diff --git a/src/utils/stringfilter.cpp b/src/utils/stringfilter.cpp
index aa94cde2..e45ec369 100644
--- a/src/utils/stringfilter.cpp
+++ b/src/utils/stringfilter.cpp
@@ -20,6 +20,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "utils/stringfilter.h"
#include "defines.h"
diff --git a/src/utils/zlib.cpp b/src/utils/zlib.cpp
index 48e01c5f..a29b0c86 100644
--- a/src/utils/zlib.cpp
+++ b/src/utils/zlib.cpp
@@ -21,11 +21,13 @@
* $Id$
*/
+#include <cstdlib>
#include <zlib.h>
-#include "utils/logger.h"
#include "utils/zlib.hpp"
+#include "utils/logger.h"
+
static void logZlibError(int error)
{
switch (error)