]> granicus.if.org Git - icinga2/commitdiff
Avoid some unnecessary PLT indirections for constructor calls
authorGunnar Beutner <gunnar@beutner.name>
Sat, 28 Mar 2015 15:13:44 +0000 (16:13 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Sat, 28 Mar 2015 15:13:44 +0000 (16:13 +0100)
refs #8890

lib/base/array.hpp
lib/base/dictionary.hpp
lib/base/string.hpp
tools/mkclass/classcompiler.cpp

index 0e887f53d68fa360dd233f3b61de1146aaf607fc..f28d66b4be156009194f02e55d36faeeeb0742a8 100644 (file)
@@ -45,6 +45,12 @@ public:
 
        typedef std::vector<Value>::size_type SizeType;
 
+       inline Array(void)
+       { }
+
+       inline ~Array(void)
+       { }
+
        Value Get(unsigned int index) const;
        void Set(unsigned int index, const Value& value);
        void Add(const Value& value);
index 056914d5e34bfbb347eaadc688b8ddda158c4c41..ef3902021ddeb2493778e4c9a31420911920cd3a 100644 (file)
@@ -49,6 +49,12 @@ public:
 
        typedef std::pair<String, Value> Pair;
 
+       inline Dictionary(void)
+       { }
+
+       inline ~Dictionary(void)
+       { }
+
        Value Get(const char *key) const;
        Value Get(const String& key) const;
        void Set(const String& key, const Value& value);
index ad019dc289925d560fb0b757737c86a625d83aa2..0869aef3ea4a5c3dfed0e38667faf4ea31fad5d1 100644 (file)
@@ -69,6 +69,9 @@ public:
                : m_Data(other.m_Data)
        { }
 
+       inline ~String(void)
+       { }
+
        template<typename InputIterator>
        String(InputIterator begin, InputIterator end)
                : m_Data(begin, end)
index 1dd24623a85bc9b8feeef39a401b434359653adf..ae2abbad0421b5df4ae9aa1a35223b757d4ec8ae 100644 (file)
@@ -597,7 +597,7 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
                        std::string realType = it->Type.GetRealType();
 
                        m_Header << "private:" << std::endl
-                                << "\t" << realType << " GetDefault" << it->GetFriendlyName() << "(void) const;" << std::endl;
+                                << "\t" << "inline " << realType << " GetDefault" << it->GetFriendlyName() << "(void) const;" << std::endl;
 
                        m_Impl << realType << " ObjectImpl<" << klass.Name << ">::GetDefault" << it->GetFriendlyName() << "(void) const" << std::endl
                               << "{" << std::endl;