From 112f024810665cd6780b5095206aef8294485f03 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 29 Mar 2016 14:42:32 +0200 Subject: [PATCH] Build fix for GCC refs #9839 --- lib/base/serializer.cpp | 2 +- lib/base/type.hpp | 2 +- lib/cli/repositoryutility.cpp | 2 +- lib/config/configitem.cpp | 2 +- test/base-type.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/base/serializer.cpp b/lib/base/serializer.cpp index 6d99bca62..92aaba92f 100644 --- a/lib/base/serializer.cpp +++ b/lib/base/serializer.cpp @@ -120,7 +120,7 @@ static Object::Ptr DeserializeObject(const Object::Ptr& object, const Dictionary if (object) instance = object; else - instance = type->Instantiate(); + instance = type->Instantiate(std::vector()); ObjectLock olock(input); BOOST_FOREACH(const Dictionary::Pair& kv, input) { diff --git a/lib/base/type.hpp b/lib/base/type.hpp index 20aba2631..f1d80498a 100644 --- a/lib/base/type.hpp +++ b/lib/base/type.hpp @@ -86,7 +86,7 @@ public: String GetPluralName(void) const; - Object::Ptr Instantiate(const std::vector& args = std::vector()) const; + Object::Ptr Instantiate(const std::vector& args) const; bool IsAssignableFrom(const Type::Ptr& other) const; diff --git a/lib/cli/repositoryutility.cpp b/lib/cli/repositoryutility.cpp index f2dc51063..1ca8984e4 100644 --- a/lib/cli/repositoryutility.cpp +++ b/lib/cli/repositoryutility.cpp @@ -233,7 +233,7 @@ bool RepositoryUtility::AddObject(const std::vector& object_paths, const if (check_config) { try { - ConfigObject::Ptr object = static_pointer_cast(utype->Instantiate()); + ConfigObject::Ptr object = static_pointer_cast(utype->Instantiate(std::vector())); /* temporarly set the object type for validation */ attrs->Set("type", utype->GetName()); Deserialize(object, attrs, false, FAConfig); diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index 83d40810b..44f65b19b 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -173,7 +173,7 @@ ConfigObject::Ptr ConfigItem::Commit(bool discard) if (IsAbstract()) return ConfigObject::Ptr(); - ConfigObject::Ptr dobj = static_pointer_cast(type->Instantiate()); + ConfigObject::Ptr dobj = static_pointer_cast(type->Instantiate(std::vector())); dobj->SetDebugInfo(m_DebugInfo); dobj->SetZoneName(m_Zone); diff --git a/test/base-type.cpp b/test/base-type.cpp index e20cee7c3..996247c97 100644 --- a/test/base-type.cpp +++ b/test/base-type.cpp @@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE(instantiate) { Type::Ptr t = Type::GetByName("PerfdataValue"); - Object::Ptr p = t->Instantiate(); + Object::Ptr p = t->Instantiate(std::vector()); BOOST_CHECK(p); }