]> granicus.if.org Git - icinga2/commitdiff
Build fix for GCC
authorGunnar Beutner <gunnar@beutner.name>
Tue, 29 Mar 2016 12:42:32 +0000 (14:42 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 29 Mar 2016 12:52:48 +0000 (14:52 +0200)
refs #9839

lib/base/serializer.cpp
lib/base/type.hpp
lib/cli/repositoryutility.cpp
lib/config/configitem.cpp
test/base-type.cpp

index 6d99bca62198f12eb0d50fb9c2fb0fdae037d96b..92aaba92f7f7ef9c1804e22fe1cce538048c0442 100644 (file)
@@ -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<Value>());
 
        ObjectLock olock(input);
        BOOST_FOREACH(const Dictionary::Pair& kv, input) {
index 20aba26317356aaaa2ac4c97a015844cf8be0f4e..f1d80498ac1e494e4f9fe83f5a3c24fdc6b5dc81 100644 (file)
@@ -86,7 +86,7 @@ public:
 
        String GetPluralName(void) const;
 
-       Object::Ptr Instantiate(const std::vector<Value>& args = std::vector<Value>()) const;
+       Object::Ptr Instantiate(const std::vector<Value>& args) const;
 
        bool IsAssignableFrom(const Type::Ptr& other) const;
 
index f2dc510638ee54eb0d971d8d8eefd7999b2e6d30..1ca8984e436b1215c22407eccb27c0d6878c6eaf 100644 (file)
@@ -233,7 +233,7 @@ bool RepositoryUtility::AddObject(const std::vector<String>& object_paths, const
 
        if (check_config) {
                try {
-                       ConfigObject::Ptr object = static_pointer_cast<ConfigObject>(utype->Instantiate());
+                       ConfigObject::Ptr object = static_pointer_cast<ConfigObject>(utype->Instantiate(std::vector<Value>()));
                        /* temporarly set the object type for validation */
                        attrs->Set("type", utype->GetName());
                        Deserialize(object, attrs, false, FAConfig);
index 83d40810b744f203d71a6d5e98f3419f6571c8c3..44f65b19beb8cb2551bda4db876e7fd38cd2cbd5 100644 (file)
@@ -173,7 +173,7 @@ ConfigObject::Ptr ConfigItem::Commit(bool discard)
        if (IsAbstract())
                return ConfigObject::Ptr();
 
-       ConfigObject::Ptr dobj = static_pointer_cast<ConfigObject>(type->Instantiate());
+       ConfigObject::Ptr dobj = static_pointer_cast<ConfigObject>(type->Instantiate(std::vector<Value>()));
 
        dobj->SetDebugInfo(m_DebugInfo);
        dobj->SetZoneName(m_Zone);
index e20cee7c3cc53450b360255216aa7d9a9551b156..996247c9752e5274985482e80623cf19d221c760 100644 (file)
@@ -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<Value>());
 
        BOOST_CHECK(p);
 }