Fixed some compiler warnings.

This commit is contained in:
Gunnar Beutner 2012-05-10 13:12:25 +02:00
parent 208e055651
commit c96fc41efd
2 changed files with 11 additions and 7 deletions

View File

@ -64,7 +64,7 @@ public:
: Exception(message) \
{ \
} \
};
}
DEFINE_EXCEPTION_CLASS(NotImplementedException);
DEFINE_EXCEPTION_CLASS(InvalidArgumentException);

View File

@ -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<typename T>
Variant(const shared_ptr<T>& value) : m_Type(VariantObject), m_ObjectValue(value) { }
Variant(const shared_ptr<T>& value)
: m_Type(VariantObject), m_ObjectValue(value) { }
VariantType GetType(void) const;