fix implicit conversion issues in LTE model
authorTom Henderson <tomh@tomh.org>
Wed, 22 Dec 2010 16:19:42 -0800
changeset 6720 16271e640e04
parent 6719 277546e1dc88
child 6721 e85ecc17279a
fix implicit conversion issues in LTE model
src/devices/lte/model/enb-mac-entity.cc
src/devices/lte/model/jakes-fading-loss-model.cc
--- a/src/devices/lte/model/enb-mac-entity.cc	Wed Dec 22 12:23:56 2010 +0000
+++ b/src/devices/lte/model/enb-mac-entity.cc	Wed Dec 22 16:19:42 2010 -0800
@@ -119,7 +119,7 @@
       NS_LOG_FUNCTION (this << "cqi " << (*it).m_idSubChannel << (*it).m_cqi);
       UeRecord::CqiFeedback cqi;
       cqi.m_subChannelId = (*it).m_idSubChannel;
-      cqi.m_cqi = (*it).m_cqi;
+      cqi.m_cqi = static_cast<int> ((*it).m_cqi);
       cqiFeedbacks.push_back (cqi);
     }
 
--- a/src/devices/lte/model/jakes-fading-loss-model.cc	Wed Dec 22 12:23:56 2010 +0000
+++ b/src/devices/lte/model/jakes-fading-loss-model.cc	Wed Dec 22 16:19:42 2010 -0800
@@ -153,12 +153,12 @@
 
   // number of path = M
   // x = 1 -> M=6, x = 2 -> M=8, x = 3 -> M=10, x = 4 -> M=12
-  int x = m_nbOfPaths.GetValue ();
+  int x = static_cast<int> (m_nbOfPaths.GetValue ());
 
   for (int i = 0; i < downlinkSubChannels; i++)
     {
       // StartJakes allow us to select a window of 0.5ms into the Jakes realization lasting 3s.
-      int startJakes = m_startJakes.GetValue ();
+      int startJakes = static_cast<int> (m_startJakes.GetValue ());
 
       MultipathForTimeDomain multipathForTimeDomain;
 
@@ -315,8 +315,8 @@
       SetLastUpdate ();
     }
 
-  int now_ms = Simulator::Now ().GetSeconds () * 1000;
-  int lastUpdate_ms = GetLastUpdate ().GetSeconds () * 1000;
+  int now_ms = static_cast<int> (Simulator::Now ().GetSeconds () * 1000);
+  int lastUpdate_ms = static_cast<int> (GetLastUpdate ().GetSeconds () * 1000);
   int index = now_ms - lastUpdate_ms;
 
   NS_LOG_FUNCTION (this << subChannel << now_ms