From f05ccd07f9d15be2a0b434a2508d96573478ccf5 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 27 Oct 2014 05:16:58 +0100 Subject: [PATCH] Build fix for GCC refs #7452 --- lib/base/json.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/base/json.cpp b/lib/base/json.cpp index cd5d30d5a..6bcf09343 100644 --- a/lib/base/json.cpp +++ b/lib/base/json.cpp @@ -111,7 +111,7 @@ struct JsonElement { String Key; bool KeySet; - Value Value; + Value EValue; JsonElement(void) : KeySet(false) @@ -124,7 +124,7 @@ public: void Push(const Value& value) { JsonElement element; - element.Value = value; + element.EValue = value; m_Stack.push(element); } @@ -140,24 +140,24 @@ public: { if (m_Stack.empty()) { JsonElement element; - element.Value = value; + element.EValue = value; m_Stack.push(element); return; } JsonElement& element = m_Stack.top(); - if (element.Value.IsObjectType()) { + if (element.EValue.IsObjectType()) { if (!element.KeySet) { element.Key = value; element.KeySet = true; } else { - Dictionary::Ptr dict = element.Value; + Dictionary::Ptr dict = element.EValue; dict->Set(element.Key, value); element.KeySet = false; } - } else if (element.Value.IsObjectType()) { - Array::Ptr arr = element.Value; + } else if (element.EValue.IsObjectType()) { + Array::Ptr arr = element.EValue; arr->Add(value); } else { BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot add value to JSON element.")); @@ -167,7 +167,7 @@ public: Value GetValue(void) const { ASSERT(m_Stack.size() == 1); - return m_Stack.top().Value; + return m_Stack.top().EValue; } void SaveException(void) @@ -262,7 +262,7 @@ static int DecodeEndMap(void *ctx) JsonContext *context = static_cast(ctx); try { - context->AddValue(context->Pop().Value); + context->AddValue(context->Pop().EValue); } catch (...) { context->SaveException(); return 0; @@ -290,7 +290,7 @@ static int DecodeEndArray(void *ctx) JsonContext *context = static_cast(ctx); try { - context->AddValue(context->Pop().Value); + context->AddValue(context->Pop().EValue); } catch (...) { context->SaveException(); return 0;