Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2556)

Unified Diff: src/wifi/model/supported-rates.cc

Issue 333070043: Eliminate Visual Studio compiler warnings (Closed)
Patch Set: Updated patch for latest changes. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/wifi/model/supported-rates.cc
===================================================================
--- a/src/wifi/model/supported-rates.cc
+++ b/src/wifi/model/supported-rates.cc
@@ -56,7 +56,7 @@
}
void
-SupportedRates::AddSupportedRate (uint32_t bs)
+SupportedRates::AddSupportedRate (uint64_t bs)
{
NS_LOG_FUNCTION (this << bs);
NS_ASSERT_MSG (IsBssMembershipSelectorRate (bs) == false, "Invalid rate");
@@ -88,7 +88,7 @@
{
return;
}
- m_rates[m_nRates] = bs / 500000;
+ m_rates[m_nRates] = static_cast<uint8_t>(bs / 500000);
m_nRates++;
NS_LOG_DEBUG ("add rate=" << bs << ", n rates=" << static_cast<uint16_t> (m_nRates));
}
@@ -99,7 +99,7 @@
{
NS_LOG_FUNCTION (this << bs);
NS_ASSERT_MSG (IsBssMembershipSelectorRate (bs) == false, "Invalid rate");
- uint8_t rate = bs / 500000;
+ uint8_t rate = static_cast<uint8_t>(bs / 500000);
for (uint8_t i = 0; i < m_nRates; i++)
{
if ((rate | 0x80) == m_rates[i])
@@ -133,7 +133,7 @@
return;
}
}
- m_rates[m_nRates] = rate;
+ m_rates[m_nRates] = static_cast<uint8_t>(rate);
NS_LOG_DEBUG ("add BSS membership selector rate " << bs << " as rate " << m_nRates);
m_nRates++;
}
@@ -142,7 +142,7 @@
SupportedRates::IsBasicRate (uint32_t bs) const
{
NS_LOG_FUNCTION (this << bs);
- uint8_t rate = (bs / 500000) | 0x80;
+ uint8_t rate = static_cast<uint8_t>(bs / 500000) | 0x80;
for (uint8_t i = 0; i < m_nRates; i++)
{
if (rate == m_rates[i])
@@ -154,10 +154,10 @@
}
bool
-SupportedRates::IsSupportedRate (uint32_t bs) const
+SupportedRates::IsSupportedRate (uint64_t bs) const
{
NS_LOG_FUNCTION (this << bs);
- uint8_t rate = bs / 500000;
+ uint8_t rate = static_cast<uint8_t>(bs / 500000);
for (uint8_t i = 0; i < m_nRates; i++)
{
if (rate == m_rates[i]
@@ -170,7 +170,7 @@
}
bool
-SupportedRates::IsBssMembershipSelectorRate (uint32_t bs) const
+SupportedRates::IsBssMembershipSelectorRate (uint64_t bs) const
{
NS_LOG_FUNCTION (this << bs);
if ((bs & 0x7f) == BSS_MEMBERSHIP_SELECTOR_HT_PHY

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b