]> granicus.if.org Git - icinga2/commitdiff
Build fix for GCC
authorGunnar Beutner <gunnar@beutner.name>
Mon, 27 Oct 2014 04:16:58 +0000 (05:16 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 27 Oct 2014 04:17:23 +0000 (05:17 +0100)
refs #7452

lib/base/json.cpp

index cd5d30d5ad9903e3622e0593e9729c051bf35dd5..6bcf0934331d23cd99e59f31ab800578a4f12479 100644 (file)
@@ -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<Dictionary>()) {
+               if (element.EValue.IsObjectType<Dictionary>()) {
                        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>()) {
-                       Array::Ptr arr = element.Value;
+               } else if (element.EValue.IsObjectType<Array>()) {
+                       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<JsonContext *>(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<JsonContext *>(ctx);
 
        try {
-               context->AddValue(context->Pop().Value);
+               context->AddValue(context->Pop().EValue);
        } catch (...) {
                context->SaveException();
                return 0;