From 16a58d1c11740945913bbb1245db728c75fe11d6 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Sat, 3 Nov 2012 20:42:32 +0100 Subject: [PATCH] Use reference instead of copying string in cmdlineparser.cpp --- cli/cmdlineparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 4e1c2ddb7..61dcfe9e0 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -545,7 +545,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[]) std::ostringstream doc; // Get documentation.. for (std::list::iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) { - const std::string name((*it)->name()); + const std::string& name((*it)->name()); const std::string info((*it)->classInfo()); if (!name.empty() && !info.empty()) doc << "===" << name << "===\n"