Fix missing const references

refs #7251
This commit is contained in:
Michael Friedrich 2014-10-15 17:10:25 +02:00
parent 7a56f3c1c5
commit 5c4f099c82
2 changed files with 4 additions and 5 deletions

View 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;

View 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);
};