From: Elias Ohm Date: Wed, 1 May 2019 10:09:24 +0000 (+0200) Subject: another small adjustment by the way just to ensure the object on stack ist the same... X-Git-Tag: v2.11.0-rc1~105^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F7154%2Fhead;p=icinga2 another small adjustment by the way just to ensure the object on stack ist the same as the one serialized further in case the object does not implement locking on mutation (besides it's mor efficient to not fetch the same value twice) --- diff --git a/lib/base/serializer.cpp b/lib/base/serializer.cpp index 1b692d599..c081c440d 100644 --- a/lib/base/serializer.cpp +++ b/lib/base/serializer.cpp @@ -142,7 +142,7 @@ static Object::Ptr SerializeObject(const Object::Ptr& input, int attributeTypes, Value value = input->GetField(i); stack.Push(field.Name, value); - fields.emplace_back(field.Name, SerializeInternal(input->GetField(i), attributeTypes, stack)); + fields.emplace_back(field.Name, SerializeInternal(value, attributeTypes, stack)); stack.Pop(); }