diff --git a/src/core/examples/command-line-example.cc b/src/core/examples/command-line-example.cc index 61e0f7c6a..7bb4e3fdc 100644 --- a/src/core/examples/command-line-example.cc +++ b/src/core/examples/command-line-example.cc @@ -49,7 +49,7 @@ std::string g_cbArg = "cbArg default"; * \returns \c true. */ bool -SetCbArg(std::string val) +SetCbArg(const std::string& val) { g_cbArg = val; return true; diff --git a/src/core/examples/hash-example.cc b/src/core/examples/hash-example.cc index b46f4a5da..514e69197 100644 --- a/src/core/examples/hash-example.cc +++ b/src/core/examples/hash-example.cc @@ -437,7 +437,7 @@ class DictFiles * \param [in] file The word file to add. * \return \c true If the file is new to the list. */ - bool Add(const std::string file) + bool Add(const std::string& file) { if (std::find(m_files.begin(), m_files.end(), file) == m_files.end()) { diff --git a/src/core/model/command-line.cc b/src/core/model/command-line.cc index 537f99612..3423bb08e 100644 --- a/src/core/model/command-line.cc +++ b/src/core/model/command-line.cc @@ -761,7 +761,7 @@ CommandLine::AddValue(const std::string& name, void CommandLine::AddValue(const std::string& name, const std::string& help, - ns3::Callback callback, + ns3::Callback callback, const std::string& defaultValue /* = "" */) { diff --git a/src/core/model/command-line.h b/src/core/model/command-line.h index 3cde4a9b0..60d42f1cf 100644 --- a/src/core/model/command-line.h +++ b/src/core/model/command-line.h @@ -322,7 +322,7 @@ class CommandLine */ void AddValue(const std::string& name, const std::string& help, - ns3::Callback callback, + ns3::Callback callback, const std::string& defaultValue = ""); /** @@ -533,7 +533,7 @@ class CommandLine bool HasDefault() const override; std::string GetDefault() const override; - ns3::Callback m_callback; /**< The Callback */ + ns3::Callback m_callback; /**< The Callback */ std::string m_default; /**< The default value, as a string, if it exists. */ }; // class CallbackItem