fix logging code for optimized builds
authorTom Henderson <tomh@tomh.org>
Thu, 24 May 2012 21:38:38 -0700
changeset 8802 7c181f5368bc
parent 8801 f6b7a1f1b278
child 8804 a9de94cf8bfa
fix logging code for optimized builds
src/lte/model/lte-mi-error-model.cc
--- a/src/lte/model/lte-mi-error-model.cc	Thu May 24 20:57:51 2012 -0700
+++ b/src/lte/model/lte-mi-error-model.cc	Thu May 24 21:38:38 2012 -0700
@@ -248,7 +248,6 @@
     {
       SpectrumValue sinrCopy = sinr;
       double sinrLin = sinrCopy[map.at (i)];
-      double sinr_db = 10*log10 (sinrLin);
       if (mcs <= 10) // QPSK
         {
           int tr = 0;
@@ -303,7 +302,7 @@
                 }
             }
         }
-      NS_LOG_LOGIC (" RB " << map.at (i) << "Minimum SNR = " << sinr_db << " V, MCS = " << (uint16_t)mcs << ", MI = " << MI);
+      NS_LOG_LOGIC (" RB " << map.at (i) << "Minimum SNR = " << 10*log10 (sinrLin) << " V, MCS = " << (uint16_t)mcs << ", MI = " << MI);
       MIsum += MI;
     }
   MI = MIsum / map.size ();
@@ -319,14 +318,13 @@
   double b = 0;
   double c = 0;
   NS_ASSERT_MSG (mcs < 29, "MCS out of range [0..28]");
-  int tbsIndex = TbsIndex[mcs];
   int cbIndex = 1;
   while ((cbIndex < 9)&&(cbMiSizeTable[cbIndex]<= cbSize))
     {
       cbIndex++;
     }
   cbIndex--;
-  NS_LOG_LOGIC (" MCS " << (uint16_t)mcs << " TBS " << tbsIndex << " CB size " << cbSize << " CB size curve " << cbMiSizeTable[cbIndex]);
+  NS_LOG_LOGIC (" MCS " << (uint16_t)mcs << " TBS " << TbsIndex[mcs] << " CB size " << cbSize << " CB size curve " << cbMiSizeTable[cbIndex]);
 
   b = bEcrTable[cbIndex][mcs];
   if (b<0.0)