as<bool>()

This commit is contained in:
Benoit Blanchon
2022-03-11 18:54:51 +01:00
parent 8b1d38f92a
commit a4307f5cd1
2 changed files with 13 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ inline bool VariantData::asBoolean() const {
return _content.asFloat != 0;
case VALUE_IS_NULL:
return false;
case VALUE_IS_POINTER:
return _content.asPointer->asBoolean();
default:
return true;
}