mirror of https://github.com/axmolengine/axmol.git
issue #2790: Don’t make an assert if converting Value failed.
This commit is contained in:
parent
5eb9446b80
commit
f01f56113c
|
@ -321,31 +321,26 @@ public:
|
|||
|
||||
ValueArray& asArray()
|
||||
{
|
||||
CCASSERT(_type == Type::ARRAY, "");
|
||||
return _arrData;
|
||||
}
|
||||
|
||||
const ValueArray& asArray() const
|
||||
{
|
||||
CCASSERT(_type == Type::ARRAY, "");
|
||||
return _arrData;
|
||||
}
|
||||
|
||||
ValueDict& asDict()
|
||||
{
|
||||
CCASSERT(_type == Type::DICTIONARY, "");
|
||||
return _dictData;
|
||||
}
|
||||
|
||||
const ValueDict& asDict() const
|
||||
{
|
||||
CCASSERT(_type == Type::DICTIONARY, "");
|
||||
return _dictData;
|
||||
}
|
||||
|
||||
IntValueDict& asIntKeyDict()
|
||||
{
|
||||
CCASSERT(_type == Type::INT_KEY_DICT, "");
|
||||
return _intKeyDictData;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue