summaryrefslogtreecommitdiff
path: root/src/core/script/Variant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/script/Variant.cpp')
-rw-r--r--src/core/script/Variant.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/script/Variant.cpp b/src/core/script/Variant.cpp
index 623b396..a379735 100644
--- a/src/core/script/Variant.cpp
+++ b/src/core/script/Variant.cpp
@@ -24,9 +24,12 @@ namespace script {
std::ostream& operator<< (std::ostream& os, const Variant &v)
{
switch (v.type) {
- case VariantType::none:
+ case VariantType::null:
os << "null";
break;
+ case VariantType::boolean:
+ os << (v.booleanValue ? "true" : "false");
+ break;
case VariantType::integer:
os << v.integerValue;
break;
@@ -34,12 +37,12 @@ std::ostream& operator<< (std::ostream& os, const Variant &v)
os << v.numberValue;
break;
case VariantType::string:
- os << "\"" << v.stringValue << "\"";
+ os << "\"" << v.getStringValue() << "\"";
break;
case VariantType::array: {
bool first = true;
os << "[";
- for (auto &v2 : v.arrayValue) {
+ for (auto &v2 : v.getArrayValue()) {
if (!first) {
os << ", ";
}
@@ -52,7 +55,7 @@ std::ostream& operator<< (std::ostream& os, const Variant &v)
case VariantType::map: {
bool first = true;
os << "{";
- for (auto &v2 : v.mapValue) {
+ for (auto &v2 : v.getMapValue()) {
if (!first) {
os << ", ";
}