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

Unified Diff: src/lte/helper/cc-helper.cc

Issue 338840043: Eliminate Visual Studio compiler warnings (Closed)
Patch Set: Update patch with latest module changes. Created 6 years 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/lte/helper/cc-helper.cc
===================================================================
--- a/src/lte/helper/cc-helper.cc
+++ b/src/lte/helper/cc-helper.cc
@@ -125,13 +125,13 @@
}
void
-CcHelper::SetDlBandwidth (uint16_t dlBandwidth)
+CcHelper::SetDlBandwidth (uint8_t dlBandwidth)
{
m_dlBandwidth = dlBandwidth;
}
void
-CcHelper::SetUlBandwidth (uint16_t ulBandwidth)
+CcHelper::SetUlBandwidth (uint8_t ulBandwidth)
{
m_ulBandwidth = ulBandwidth;
}
@@ -152,18 +152,18 @@
return m_dlEarfcn;
}
-uint16_t CcHelper::GetDlBandwidth ()
+uint8_t CcHelper::GetDlBandwidth ()
{
return m_dlBandwidth;
}
-uint16_t CcHelper::GetUlBandwidth ()
+uint8_t CcHelper::GetUlBandwidth ()
{
return m_ulBandwidth;
}
ComponentCarrier
-CcHelper::DoCreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
+CcHelper::DoCreateSingleCc (uint8_t ulBandwidth, uint8_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
{
return CreateSingleCc (ulBandwidth, dlBandwidth, ulEarfcn, dlEarfcn, isPrimary);
}
@@ -175,10 +175,10 @@
uint32_t ulEarfcn = m_ulEarfcn;
uint32_t dlEarfcn = m_dlEarfcn;
- uint32_t maxBandwidthRb = std::max<uint32_t> (m_ulBandwidth, m_dlBandwidth);
+ uint8_t maxBandwidthRb = std::max<uint8_t> (m_ulBandwidth, m_dlBandwidth);
// Convert bandwidth from RBs to kHz
- uint32_t maxBandwidthKhz = LteSpectrumValueHelper::GetChannelBandwidth(maxBandwidthRb) / 1e3;
+ uint32_t maxBandwidthKhz = static_cast<uint32_t> (LteSpectrumValueHelper::GetChannelBandwidth(maxBandwidthRb) / 1e3);
for (uint8_t i = 0; i < m_numberOfComponentCarriers; i++)
{
@@ -218,7 +218,7 @@
return ccmap;
}
ComponentCarrier
-CcHelper::CreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
+CcHelper::CreateSingleCc (uint8_t ulBandwidth, uint8_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
{
ComponentCarrier cc;
if ( m_ulEarfcn != 0)
@@ -227,7 +227,7 @@
}
else
{
- uint16_t ul = cc.GetUlEarfcn () + ulEarfcn;
+ uint32_t ul = cc.GetUlEarfcn () + ulEarfcn;
cc.SetUlEarfcn (ul);
}
if ( m_dlEarfcn != 0)
@@ -236,7 +236,7 @@
}
else
{
- uint16_t dl = cc.GetDlEarfcn () + dlEarfcn;
+ uint32_t dl = cc.GetDlEarfcn () + dlEarfcn;
cc.SetDlEarfcn (dl);
}
cc.SetDlBandwidth (dlBandwidth);

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