From 2507a15f8cf8728e8006aec7cdef30e484612162 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 12 Aug 2010 13:57:16 -0600 Subject: Fix some issues in the Event class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Thorbjørn Lindeijer --- src/event.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/event.h') diff --git a/src/event.h b/src/event.h index 7acd2190..b27b9c33 100644 --- a/src/event.h +++ b/src/event.h @@ -74,7 +74,7 @@ public: /** * Returns true if the given variable exists and is an integer. */ - bool hasInt(const std::string &key); + bool hasInt(const std::string &key) const; /** * Sets the given variable to the given string, if it isn't already set. @@ -90,14 +90,14 @@ public: * Returns the given variable if it is set and a string, returning the * given default otherwise. */ - inline const std::string &getString(const std::string &key, - const std::string &defaultValue) const + inline std::string getString(const std::string &key, + const std::string &defaultValue) const { try { return getString(key); } catch (BadEvent) { return defaultValue; }} /** * Returns true if the given variable exists and is a string. */ - bool hasString(const std::string &key); + bool hasString(const std::string &key) const; /** * Sets the given variable to the given floating-point, if it isn't already @@ -120,7 +120,7 @@ public: /** * Returns true if the given variable exists and is a floating-point. */ - bool hasFloat(const std::string &key); + bool hasFloat(const std::string &key) const; /** * Sets the given variable to the given boolean, if it isn't already set. @@ -142,7 +142,7 @@ public: /** * Returns true if the given variable exists and is a boolean. */ - bool hasBool(const std::string &key); + bool hasBool(const std::string &key) const; private: std::string mEventName; -- cgit v1.2.3-70-g09d2