core: Align Callback usage with signature (L309) in CommandLine class
This commit is contained in:
committed by
Stefano Avallone
parent
86d90acc3f
commit
7e7f766ff0
@@ -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;
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -761,7 +761,7 @@ CommandLine::AddValue(const std::string& name,
|
||||
void
|
||||
CommandLine::AddValue(const std::string& name,
|
||||
const std::string& help,
|
||||
ns3::Callback<bool, std::string> callback,
|
||||
ns3::Callback<bool, const std::string&> callback,
|
||||
const std::string& defaultValue /* = "" */)
|
||||
|
||||
{
|
||||
|
||||
@@ -322,7 +322,7 @@ class CommandLine
|
||||
*/
|
||||
void AddValue(const std::string& name,
|
||||
const std::string& help,
|
||||
ns3::Callback<bool, std::string> callback,
|
||||
ns3::Callback<bool, const std::string&> callback,
|
||||
const std::string& defaultValue = "");
|
||||
|
||||
/**
|
||||
@@ -533,7 +533,7 @@ class CommandLine
|
||||
bool HasDefault() const override;
|
||||
std::string GetDefault() const override;
|
||||
|
||||
ns3::Callback<bool, std::string> m_callback; /**< The Callback */
|
||||
ns3::Callback<bool, const std::string&> m_callback; /**< The Callback */
|
||||
std::string m_default; /**< The default value, as a string, if it exists. */
|
||||
}; // class CallbackItem
|
||||
|
||||
|
||||
Reference in New Issue
Block a user