From c96fc41efd6ae2b61e8786915c86bb2036a7da7e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 10 May 2012 13:12:25 +0200 Subject: [PATCH] Fixed some compiler warnings. --- base/exception.h | 2 +- base/variant.h | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/base/exception.h b/base/exception.h index 6ee1d521b..659bf333b 100644 --- a/base/exception.h +++ b/base/exception.h @@ -64,7 +64,7 @@ public: : Exception(message) \ { \ } \ - }; + } DEFINE_EXCEPTION_CLASS(NotImplementedException); DEFINE_EXCEPTION_CLASS(InvalidArgumentException); diff --git a/base/variant.h b/base/variant.h index 77034fd10..34f7823cd 100644 --- a/base/variant.h +++ b/base/variant.h @@ -34,25 +34,29 @@ enum I2_BASE_API VariantType class I2_BASE_API Variant { private: + mutable VariantType m_Type; + mutable long m_IntegerValue; mutable string m_StringValue; mutable Object::Ptr m_ObjectValue; - mutable VariantType m_Type; - void Convert(VariantType newType) const; public: inline Variant(void) : m_Type(VariantEmpty) { } - inline Variant(long value) : m_Type(VariantInteger), m_IntegerValue(value) { } + inline Variant(long value) + : m_Type(VariantInteger), m_IntegerValue(value) { } - inline Variant(const char *value) : m_Type(VariantString), m_StringValue(string(value)) { } + inline Variant(const char *value) + : m_Type(VariantString), m_StringValue(string(value)) { } - inline Variant(string value) : m_Type(VariantString), m_StringValue(value) { } + inline Variant(string value) + : m_Type(VariantString), m_StringValue(value) { } template - Variant(const shared_ptr& value) : m_Type(VariantObject), m_ObjectValue(value) { } + Variant(const shared_ptr& value) + : m_Type(VariantObject), m_ObjectValue(value) { } VariantType GetType(void) const;