From 3d2f8aa4d9d9a3123149d5806315a26dc3a33fd5 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 13 Aug 2006 18:32:09 +0000 Subject: Fixed missing constructor in Item class. --- ChangeLog | 5 +++++ src/items.h | 51 ++++++++++++++++++++++++++++----------------------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a0d03e8..36a53ff0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-08-13 Bjørn Lindeijer + + * src/items.h: Fixed missing constructor since there is no default + constructor in its superclass Object. + 2006-08-13 Eugenio Favalli * tmwserv.cbp, tmwserv.dev: Updated project files. diff --git a/src/items.h b/src/items.h index 1b973566..99afba3f 100644 --- a/src/items.h +++ b/src/items.h @@ -31,29 +31,34 @@ */ class Item : public Object { - //Item type - unsigned int type; - - public: - /** - * Enumeration of available Item types. - */ - enum { - Usable, - Equipment - }; - - virtual ~Item() throw() { } - - /** - * The function called to use an item - */ - void use(); - - /** - * Return type of item - */ - unsigned int getType() { return type; } + public: + /** + * Enumeration of available Item types. + */ + enum { + Usable, + Equipment + }; + + Item(int type, int id): + Object(type, id) + {} + + virtual ~Item() throw() { } + + /** + * The function called to use an item + */ + void use(); + + /** + * Return type of item + */ + unsigned int getType() const { return type; } + + private: + //Item type + unsigned int type; }; #endif -- cgit v1.2.3-70-g09d2