From 8809e34f9d9241c39ee067de25d968bea887783f Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Thu, 25 Nov 2010 11:12:43 +0100 Subject: Add Action() taking type and target and Actions::operator bool(). --- common/action.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/action.h') diff --git a/common/action.h b/common/action.h index a2dc6e4..4024c67 100644 --- a/common/action.h +++ b/common/action.h @@ -25,6 +25,9 @@ class Action { //! Target of action (if applicable). int target; + Action(); + Action(Type ty, int ta = 0); + //! Compare to another action. bool operator==(const Action& other); @@ -41,6 +44,9 @@ class Actions : public std::vector { //! Check if specified action is present in list. bool contains(Action action); + //! Check whether list is empty or not. + operator bool(); + template void serialize(Archive & ar, const unsigned int version) { ar & boost::serialization::base_object >(*this); -- cgit v1.2.3