SF 1969276 DynamicAny("") should be false; added operator!

This commit is contained in:
Aleksandar Fabijanic
2008-05-22 01:29:32 +00:00
parent 1de922e8c3
commit 532672c027
3 changed files with 22 additions and 7 deletions

View File

@@ -2214,12 +2214,15 @@ public:
void convert(bool& val) const
{
static const std::string VAL_FALSE("false");
static const std::string VAL_INTFALSE("0");
static const std::string VAL_INT_FALSE("0");
if (_val == VAL_INTFALSE || (icompare(_val, VAL_FALSE) == 0))
if (_val.empty() ||
_val == VAL_INT_FALSE ||
(icompare(_val, VAL_FALSE) == 0))
{
val = false;
else
val = true;
}
else val = true;
}
void convert(float& val) const