From cb0c1b01d55a27fa1150dc96cdc76888cab422fe Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 20 Mar 2014 14:28:29 +0100 Subject: [PATCH] Add special cases for Array and Dictionary in Value::GetTypeName(). Refs #5804 --- lib/base/value.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/base/value.cpp b/lib/base/value.cpp index ac11f7d31..9b466269b 100644 --- a/lib/base/value.cpp +++ b/lib/base/value.cpp @@ -220,9 +220,14 @@ String Value::GetTypeName(void) const return "String"; case ValueObject: t = static_cast(*this)->GetReflectionType(); - if (!t) - return "Object"; - else + if (!t) { + if (IsObjectType()) + return "Array"; + else if (IsObjectType()) + return "Dictionary"; + else + return "Object"; + } else return t->GetName(); default: return "Invalid";