mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 15:14:07 +02:00
Fixed some compiler warnings.
This commit is contained in:
parent
208e055651
commit
c96fc41efd
@ -64,7 +64,7 @@ public:
|
|||||||
: Exception(message) \
|
: Exception(message) \
|
||||||
{ \
|
{ \
|
||||||
} \
|
} \
|
||||||
};
|
}
|
||||||
|
|
||||||
DEFINE_EXCEPTION_CLASS(NotImplementedException);
|
DEFINE_EXCEPTION_CLASS(NotImplementedException);
|
||||||
DEFINE_EXCEPTION_CLASS(InvalidArgumentException);
|
DEFINE_EXCEPTION_CLASS(InvalidArgumentException);
|
||||||
|
@ -34,25 +34,29 @@ enum I2_BASE_API VariantType
|
|||||||
class I2_BASE_API Variant
|
class I2_BASE_API Variant
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
mutable VariantType m_Type;
|
||||||
|
|
||||||
mutable long m_IntegerValue;
|
mutable long m_IntegerValue;
|
||||||
mutable string m_StringValue;
|
mutable string m_StringValue;
|
||||||
mutable Object::Ptr m_ObjectValue;
|
mutable Object::Ptr m_ObjectValue;
|
||||||
|
|
||||||
mutable VariantType m_Type;
|
|
||||||
|
|
||||||
void Convert(VariantType newType) const;
|
void Convert(VariantType newType) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline Variant(void) : m_Type(VariantEmpty) { }
|
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>
|
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;
|
VariantType GetType(void) const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user