wifi: Return a const reference from WifiMode::GetUniqueName()

This commit is contained in:
Tolik Zinovyev
2022-03-15 09:35:01 +00:00
committed by Stefano Avallone
parent 10d4dd2023
commit f3c2163658
3 changed files with 3 additions and 3 deletions

View File

@@ -136,7 +136,7 @@ WifiMode::GetConstellationSize (void) const
return item->GetConstellationSizeCallback ();
}
std::string
const std::string&
WifiMode::GetUniqueName (void) const
{
//needed for ostream printing of the invalid mode

View File

@@ -127,7 +127,7 @@ public:
* \returns a human-readable representation of this WifiMode
* instance.
*/
std::string GetUniqueName (void) const;
const std::string& GetUniqueName (void) const;
/**
* \returns true if this mode is a mandatory mode, false
* otherwise.

View File

@@ -337,7 +337,7 @@ WifiTxVector::IsValid (void) const
{
return false;
}
std::string modeName = m_mode.GetUniqueName ();
const std::string& modeName = m_mode.GetUniqueName ();
if (m_channelWidth == 20)
{
if (m_nss != 3 && m_nss != 6)