Skip to content

Commit

Permalink
CVariant: add isNumber()
Browse files Browse the repository at this point in the history
  • Loading branch information
Montellese committed Aug 4, 2012
1 parent 8621a9d commit 9d6148d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xbmc/utils/Variant.cpp
Expand Up @@ -303,6 +303,11 @@ bool CVariant::isNull() const
return m_type == VariantTypeNull || m_type == VariantTypeConstNull;
}

bool CVariant::isNumber() const
{
return m_type == VariantTypeInteger || m_type == VariantTypeUnsignedInteger || m_type == VariantTypeDouble;
}

CVariant::VariantType CVariant::type() const
{
return m_type;
Expand Down
1 change: 1 addition & 0 deletions xbmc/utils/Variant.h
Expand Up @@ -76,6 +76,7 @@ class CVariant
bool isArray() const;
bool isObject() const;
bool isNull() const;
bool isNumber() const;

VariantType type() const;

Expand Down

0 comments on commit 9d6148d

Please sign in to comment.