]> granicus.if.org Git - icinga2/commitdiff
Fix missing const references
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 15 Oct 2014 15:10:25 +0000 (17:10 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 15 Oct 2014 15:10:25 +0000 (17:10 +0200)
refs #7251

lib/cli/objectlistcommand.cpp
lib/cli/objectlistcommand.hpp

index 3240a8cacebcefa923516e44faea996ab1ba0a0a..9a57cea06be5f7bf8432016a3b4e1fca1c1b4af2 100644 (file)
@@ -112,7 +112,7 @@ int ObjectListCommand::Run(const boost::program_options::variables_map& vm, cons
        return 0;
 }
 
-void ObjectListCommand::ReadObject(const String& message, std::map<String, int>& type_count, String name_filter, String type_filter)
+void ObjectListCommand::ReadObject(const String& message, std::map<String, int>& type_count, const String& name_filter, const String& type_filter)
 {
        Dictionary::Ptr object = JsonDeserialize(message);
 
@@ -206,8 +206,7 @@ String ObjectListCommand::FormatHint(const Array::Ptr& msg, int indent)
        return msgbuf.str();
 }
 
-
-String ObjectListCommand::FormatTypeCounts(std::map<String, int> type_count)
+String ObjectListCommand::FormatTypeCounts(const std::map<String, int>& type_count)
 {
        std::ostringstream msgbuf;
 
index 2db02fa832705d60991685c3d8fc650c12b324ac..716d8888c4a8148f18881ddb13c60752ba2074b1 100644 (file)
@@ -46,11 +46,11 @@ public:
         virtual int Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const;
 
 private:
-        static void ReadObject(const String& message, std::map<String, int>& type_count, String name_filter, String type_filter);
+        static void ReadObject(const String& message, std::map<String, int>& type_count, const String& name_filter, const String& type_filter);
         static String FormatProperties(const Dictionary::Ptr& props, const Dictionary::Ptr& debug_hints, int indent = 0);
         static String FormatHints(const Dictionary::Ptr& hints, int indent = 0);
         static String FormatHint(const Array::Ptr& msg, int indent = 0);
-        static String FormatTypeCounts(std::map<String, int> type_count);
+        static String FormatTypeCounts(const std::map<String, int>& type_count);
         static String FormatValue(const Value& val);
         static String FormatArray(const Array::Ptr& arr);
 };