summaryrefslogtreecommitdiff
path: root/src/game.h
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 01:20:48 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 01:20:48 +0000
commit78ab0ec914d3c5a97f162905afb3dede53f8b9ed (patch)
tree53e386c28d5621535c76c35c20f28b7dd6235ee3 /src/game.h
parent3bd2abeeffe9fb9b23293975b159ee2ddc868e5b (diff)
downloadmana-78ab0ec914d3c5a97f162905afb3dede53f8b9ed.tar.gz
mana-78ab0ec914d3c5a97f162905afb3dede53f8b9ed.tar.bz2
mana-78ab0ec914d3c5a97f162905afb3dede53f8b9ed.tar.xz
mana-78ab0ec914d3c5a97f162905afb3dede53f8b9ed.zip
Use std::auto_ptr in some places.
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/game.h b/src/game.h
index ca7f0ed8..a44c8970 100644
--- a/src/game.h
+++ b/src/game.h
@@ -25,6 +25,7 @@
#define _TMW_GAME_
#include <iosfwd>
+#include <memory>
#define SPEECH_TIME 80
#define SPEECH_MAX_TIME 100
@@ -49,16 +50,17 @@ class Game
protected:
Network *mNetwork;
- MessageHandler *mBeingHandler;
- MessageHandler *mBuySellHandler;
- MessageHandler *mChatHandler;
- MessageHandler *mEquipmentHandler;
- MessageHandler *mInventoryHandler;
- MessageHandler *mItemHandler;
- MessageHandler *mNpcHandler;
- MessageHandler *mPlayerHandler;
- MessageHandler *mSkillHandler;
- MessageHandler *mTradeHandler;
+ typedef std::auto_ptr<MessageHandler> MessageHandlerPtr;
+ MessageHandlerPtr mBeingHandler;
+ MessageHandlerPtr mBuySellHandler;
+ MessageHandlerPtr mChatHandler;
+ MessageHandlerPtr mEquipmentHandler;
+ MessageHandlerPtr mInventoryHandler;
+ MessageHandlerPtr mItemHandler;
+ MessageHandlerPtr mNpcHandler;
+ MessageHandlerPtr mPlayerHandler;
+ MessageHandlerPtr mSkillHandler;
+ MessageHandlerPtr mTradeHandler;
};
/**