summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-20 15:19:50 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-20 15:19:50 +0000
commit35d2fefb789751b8730c6f0fae674e72673228d0 (patch)
tree185c267faed52cd416cdefa16d1e160d2b0d3c02
parentca58ec1faedca0081ecd233f2cefa1ba783cebf4 (diff)
downloadmana-35d2fefb789751b8730c6f0fae674e72673228d0.tar.gz
mana-35d2fefb789751b8730c6f0fae674e72673228d0.tar.bz2
mana-35d2fefb789751b8730c6f0fae674e72673228d0.tar.xz
mana-35d2fefb789751b8730c6f0fae674e72673228d0.zip
Merged revisions 3692 via svnmerge from
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r3692 | gmelquio | 2007-10-27 11:03:13 +0200 (Sat, 27 Oct 2007) | 1 line Made it compile with GCC 4.3 ........
-rw-r--r--ChangeLog17
-rw-r--r--src/beingmanager.cpp2
-rw-r--r--src/flooritemmanager.cpp2
-rw-r--r--src/game.cpp16
-rw-r--r--src/gui/button.cpp4
-rw-r--r--src/gui/chat.cpp5
-rw-r--r--src/gui/chat.h2
-rw-r--r--src/gui/playerbox.cpp2
-rw-r--r--src/gui/scrollarea.cpp2
-rw-r--r--src/gui/setup.cpp2
-rw-r--r--src/gui/skill.cpp4
-rw-r--r--src/gui/tabbedcontainer.cpp2
-rw-r--r--src/gui/textfield.cpp4
-rw-r--r--src/gui/window.cpp5
-rw-r--r--src/gui/windowcontainer.cpp2
-rw-r--r--src/localplayer.h2
-rw-r--r--src/log.cpp9
-rw-r--r--src/main.cpp2
-rw-r--r--src/net/messageout.cpp5
-rw-r--r--src/particle.cpp5
-rw-r--r--src/properties.h7
-rw-r--r--src/resources/buddylist.cpp8
-rw-r--r--src/resources/imageset.cpp2
-rw-r--r--src/resources/itemdb.cpp4
-rw-r--r--src/resources/iteminfo.h2
-rw-r--r--src/resources/monsterdb.cpp2
-rw-r--r--src/resources/monsterinfo.cpp2
-rw-r--r--src/resources/monsterinfo.h2
28 files changed, 89 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 9510b750..55499c26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,23 @@
ViewID is 26, item ID is 632, item properties are c&p from jeans
shorts.
+2007-10-27 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/properties.h, src/game.cpp, src/channel.h, src/log.cpp,
+ src/gui/window.cpp, src/gui/setup.cpp, src/gui/button.cpp,
+ src/gui/chat.h, src/gui/widgets/dropdown.cpp, src/gui/chat.cpp,
+ src/gui/tabbedcontainer.cpp, src/gui/windowcontainer.cpp,
+ src/gui/skill.cpp, src/gui/serverdialog.cpp, src/gui/textfield.cpp,
+ src/gui/playerbox.cpp, src/gui/scrollarea.cpp, src/beingmanager.cpp,
+ src/flooritemmanager.cpp, src/channelmanager.cpp, src/main.cpp,
+ src/particle.cpp, src/net/messageout.cpp, src/channel.cpp,
+ src/localplayer.h, src/resources/imageset.cpp,
+ src/resources/buddylist.cpp, src/resources/monsterinfo.h,
+ src/resources/iteminfo.h, src/resources/monsterdb.cpp,
+ src/resources/monsterinfo.cpp, src/resources/itemdb.cpp: Fixed missing
+ dependencies, spurious const qualifiers, and weak brackets, so that it
+ compiles with GCC 4.3.
+
2007-10-26 Philipp Sehmisch <tmw@crushnet.org>
* src/gui/item_ammount.cpp: Item amount dialog is now skipped
diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp
index d3ac88f2..f35a305d 100644
--- a/src/beingmanager.cpp
+++ b/src/beingmanager.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "beingmanager.h"
#include "localplayer.h"
diff --git a/src/flooritemmanager.cpp b/src/flooritemmanager.cpp
index 680616a8..8a00cc51 100644
--- a/src/flooritemmanager.cpp
+++ b/src/flooritemmanager.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "flooritemmanager.h"
#include "floor_item.h"
diff --git a/src/game.cpp b/src/game.cpp
index be1c62b6..2794b2e6 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -693,24 +693,24 @@ void Game::handleInput()
unsigned char direction = 0;
// Translate pressed keys to movement and direction
- if ( keyboard.isKeyActive(keyboard.KEY_MOVE_UP) ||
- joystick && joystick->isUp())
+ if (keyboard.isKeyActive(keyboard.KEY_MOVE_UP) ||
+ (joystick && joystick->isUp()))
{
direction |= Being::UP;
}
- else if ( keyboard.isKeyActive(keyboard.KEY_MOVE_DOWN) ||
- joystick && joystick->isDown())
+ else if (keyboard.isKeyActive(keyboard.KEY_MOVE_DOWN) ||
+ (joystick && joystick->isDown()))
{
direction |= Being::DOWN;
}
- if ( keyboard.isKeyActive(keyboard.KEY_MOVE_LEFT) ||
- joystick && joystick->isLeft())
+ if (keyboard.isKeyActive(keyboard.KEY_MOVE_LEFT) ||
+ (joystick && joystick->isLeft()))
{
direction |= Being::LEFT;
}
- else if ( keyboard.isKeyActive(keyboard.KEY_MOVE_RIGHT) ||
- joystick && joystick->isRight())
+ else if (keyboard.isKeyActive(keyboard.KEY_MOVE_RIGHT) ||
+ (joystick && joystick->isRight()))
{
direction |= Being::RIGHT;
}
diff --git a/src/gui/button.cpp b/src/gui/button.cpp
index 0379ebc0..e47f90f8 100644
--- a/src/gui/button.cpp
+++ b/src/gui/button.cpp
@@ -21,12 +21,14 @@
* $Id$
*/
-#include "button.h"
+#include <algorithm>
#include <guichan/exception.hpp>
#include <guichan/graphics.hpp>
#include <guichan/imagefont.hpp>
+#include "button.h"
+
#include "../graphics.h"
#include "../resources/image.h"
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 44b332b1..877866df 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -21,13 +21,14 @@
* $Id$
*/
-#include "chat.h"
-
+#include <algorithm>
#include <sstream>
#include <guichan/focushandler.hpp>
#include <guichan/key.hpp>
+#include "chat.h"
+
#include "browserbox.h"
#include "chatinput.h"
#include "scrollarea.h"
diff --git a/src/gui/chat.h b/src/gui/chat.h
index ad325339..9c57f227 100644
--- a/src/gui/chat.h
+++ b/src/gui/chat.h
@@ -195,7 +195,7 @@ class ChatWindow : public Window, public gcn::ActionListener,
bool mTmpVisible;
/** One item in the chat log */
- typedef struct CHATLOG
+ struct CHATLOG
{
std::string nick;
std::string text;
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index e3f5b540..8e5f1827 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "playerbox.h"
#include "../player.h"
diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp
index 816f94a8..cf555ef4 100644
--- a/src/gui/scrollarea.cpp
+++ b/src/gui/scrollarea.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "scrollarea.h"
#include "../graphics.h"
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index 7142c76b..3089e54a 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "setup.h"
#include "button.h"
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index 6406dd2a..3ab40c9a 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -21,10 +21,12 @@
* $Id$
*/
-#include "skill.h"
+#include <algorithm>
#include <guichan/widgets/label.hpp>
+#include "skill.h"
+
#include "button.h"
#include "listbox.h"
#include "scrollarea.h"
diff --git a/src/gui/tabbedcontainer.cpp b/src/gui/tabbedcontainer.cpp
index 5d6d21d1..8fb2f598 100644
--- a/src/gui/tabbedcontainer.cpp
+++ b/src/gui/tabbedcontainer.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "tabbedcontainer.h"
#include "button.h"
diff --git a/src/gui/textfield.cpp b/src/gui/textfield.cpp
index ce7f6d5f..5b875da3 100644
--- a/src/gui/textfield.cpp
+++ b/src/gui/textfield.cpp
@@ -21,10 +21,12 @@
* $Id$
*/
-#include "textfield.h"
+#include <algorithm>
#include <guichan/font.hpp>
+#include "textfield.h"
+
#include "../graphics.h"
#include "../resources/image.h"
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 90031545..b7ff79f7 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -21,11 +21,14 @@
* $Id$
*/
-#include "window.h"
+#include <algorithm>
+#include <climits>
#include <guichan/exception.hpp>
#include <guichan/widgets/icon.hpp>
+#include "window.h"
+
#include "gui.h"
#include "gccontainer.h"
#include "windowcontainer.h"
diff --git a/src/gui/windowcontainer.cpp b/src/gui/windowcontainer.cpp
index 14aaaf68..d10c519c 100644
--- a/src/gui/windowcontainer.cpp
+++ b/src/gui/windowcontainer.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "windowcontainer.h"
#include "../utils/dtor.h"
diff --git a/src/localplayer.h b/src/localplayer.h
index 21035378..8269e29e 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -24,7 +24,7 @@
#ifndef _TMW_LOCALPLAYER_H
#define _TMW_LOCALPLAYER_H
-#include <memory.h>
+#include <memory>
#include "player.h"
diff --git a/src/log.cpp b/src/log.cpp
index e0825ebc..63a34776 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -19,7 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "log.h"
+#include <cstdarg>
+#include <cstdlib>
+#include <iostream>
+#include <sstream>
#include <sys/time.h>
@@ -29,9 +32,7 @@
#include <Carbon/Carbon.h>
#endif
-#include <cstdarg>
-#include <iostream>
-#include <sstream>
+#include "log.h"
Logger::Logger():
mLogToStandardOut(false)
diff --git a/src/main.cpp b/src/main.cpp
index 9c8b6f4e..d8818136 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -644,7 +644,9 @@ int main(int argc, char *argv[])
case SDL_KEYDOWN:
if (event.key.keysym.sym == SDLK_ESCAPE)
+ {
state = EXIT_STATE;
+ }
break;
}
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp
index c671f67c..9c87e69e 100644
--- a/src/net/messageout.cpp
+++ b/src/net/messageout.cpp
@@ -21,14 +21,15 @@
* $Id$
*/
-#include "messageout.h"
-
+#include <cstring>
#include <string>
#include <SDL.h>
#include <SDL_endian.h>
#include "network.h"
+#include "messageout.h"
+
MessageOut::MessageOut(Network *network):
mNetwork(network),
mData(0),
diff --git a/src/particle.cpp b/src/particle.cpp
index 0f116b15..93fc7893 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -21,10 +21,11 @@
* $Id$
*/
-#include "particle.h"
-
+#include <algorithm>
#include <cmath>
+#include "particle.h"
+
#include "animationparticle.h"
#include "configuration.h"
#include "imageparticle.h"
diff --git a/src/properties.h b/src/properties.h
index bcd114c1..93148bdf 100644
--- a/src/properties.h
+++ b/src/properties.h
@@ -49,7 +49,7 @@ class Properties
* doesn't exist.
*/
const std::string&
- getProperty(const std::string &name, const std::string &def = "")
+ getProperty(const std::string &name, const std::string &def = "") const
{
PropertyMap::const_iterator i = mProperties.find(name);
return (i != mProperties.end()) ? i->second : def;
@@ -63,8 +63,7 @@ class Properties
* @return the value of the given property, or 0.0f when it doesn't
* exist.
*/
- const float
- getFloatProperty(const std::string &name, float def = 0.0f)
+ float getFloatProperty(std::string const &name, float def = 0.0f) const
{
PropertyMap::const_iterator i = mProperties.find(name);
float ret = def;
@@ -85,7 +84,7 @@ class Properties
* <code>false</code> otherwise.
*/
bool
- hasProperty(const std::string &name)
+ hasProperty(const std::string &name) const
{
return (mProperties.find(name) != mProperties.end());
}
diff --git a/src/resources/buddylist.cpp b/src/resources/buddylist.cpp
index 9327ef60..2f85825a 100644
--- a/src/resources/buddylist.cpp
+++ b/src/resources/buddylist.cpp
@@ -21,11 +21,15 @@
* $Id$
*/
+#include <algorithm>
+#include <cstring>
+#include <iostream>
+#include <fstream>
+
#include "buddylist.h"
+
#include "../main.h"
#include "../configuration.h"
-#include <iostream>
-#include <fstream>
BuddyList::BuddyList()
{
diff --git a/src/resources/imageset.cpp b/src/resources/imageset.cpp
index 565e8860..08a6a110 100644
--- a/src/resources/imageset.cpp
+++ b/src/resources/imageset.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "imageset.h"
#include "../log.h"
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index fb95a521..9d64534c 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -21,12 +21,12 @@
* $Id$
*/
+#include <algorithm>
#include <cassert>
+#include <libxml/tree.h>
#include "itemdb.h"
-#include <libxml/tree.h>
-
#include "iteminfo.h"
#include "resourcemanager.h"
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index b6fc922c..2726a012 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -107,7 +107,7 @@ class ItemInfo
void setWeaponType(int);
- const SpriteAction getAttackType() const
+ SpriteAction getAttackType() const
{ return mAttackType; }
void addSound(EquipmentSoundEvent event, const std::string &filename);
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 7bdafdc2..84e3a219 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <algorithm>
+
#include "monsterdb.h"
#include "resourcemanager.h"
diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp
index 9b841058..c4c9ce10 100644
--- a/src/resources/monsterinfo.cpp
+++ b/src/resources/monsterinfo.cpp
@@ -21,6 +21,8 @@
* $Id: monsterinfo.cpp 2650 2006-09-03 15:00:47Z b_lindeijer $
*/
+#include <algorithm>
+
#include "monsterinfo.h"
#include "../utils/dtor.h"
diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h
index 7613fee2..7d49db1a 100644
--- a/src/resources/monsterinfo.h
+++ b/src/resources/monsterinfo.h
@@ -77,7 +77,7 @@ class MonsterInfo
const std::string&
getSprite() const { return mSprite; }
- const Being::TargetCursorSize
+ Being::TargetCursorSize
getTargetCursorSize() const { return mTargetCursorSize; }
std::string