diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2014-12-20 18:28:07 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2014-12-20 18:28:07 +0100 |
commit | 1aab1b716e1f2a4a58dd2bf3ca319df3761b151b (patch) | |
tree | 4221f3de770df24bb62aca4ab41a113f5f196445 /src/core/common | |
parent | 06ed8e2548c1fcf3b613ec7b5e5b1b03a9c4280a (diff) |
additional comment in Variant.cpp
Diffstat (limited to 'src/core/common')
-rw-r--r-- | src/core/common/Variant.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/common/Variant.cpp b/src/core/common/Variant.cpp index 78fdfce..dac3655 100644 --- a/src/core/common/Variant.cpp +++ b/src/core/common/Variant.cpp @@ -106,6 +106,7 @@ Variant::intType Variant::toInt() const case Type::STRING: return 0; // TODO: Parse string as int case Type::ARRAY: { + // JavaScript behaviour when converting arrays to ints const arrayType &a = asArray(); return (a.size() == 1) ? a[0].toInt() : 0; } @@ -129,6 +130,7 @@ Variant::doubleType Variant::toDouble() const case Type::STRING: return 0.0; // TODO: Parse string as double case Type::ARRAY: { + // JavaScript behaviour when converting array to doubles const arrayType &a = asArray(); return (a.size() == 1) ? a[0].toDouble() : 0; } |