Fix compiler warnings and missing std::

This commit is contained in:
Peter D. Barnes, Jr.
2013-11-14 15:25:33 -08:00
parent 2fa1712985
commit b0640f8065
3 changed files with 5 additions and 5 deletions

View File

@@ -269,7 +269,7 @@ EutranMeasurementMapping::ActualHysteresis2IeValue (double hysteresisDb)
}
uint8_t ieValue = lround (hysteresisDb * 2.0);
NS_ASSERT (ieValue >= 0);
// NS_ASSERT (ieValue >= 0); // always true due to limited range of data type
NS_ASSERT (ieValue <= 30);
return ieValue;
}
@@ -301,7 +301,7 @@ EutranMeasurementMapping::ActualA3Offset2IeValue (double a3OffsetDb)
}
uint8_t ieValue = lround (a3OffsetDb * 2.0);
NS_ASSERT (ieValue >= -30);
// NS_ASSERT (ieValue >= -30); // always true due to limited range of data type
NS_ASSERT (ieValue <= 30);
return ieValue;
}

View File

@@ -1487,7 +1487,7 @@ LteUeRrc::SaveUeMeasurements (uint16_t cellId, double rsrp, double rsrq,
storedMeasIt->second.rsrp = (1 - m_varMeasConfig.aRsrp) * storedMeasIt->second.rsrp
+ m_varMeasConfig.aRsrp * rsrp;
if (isnan (storedMeasIt->second.rsrq))
if (std::isnan (storedMeasIt->second.rsrq))
{
// the previous RSRQ measurements provided UE PHY are invalid
storedMeasIt->second.rsrq = rsrq; // replace it with unfiltered value

View File

@@ -156,12 +156,12 @@ LteHandoverTargetTestCase::LteHandoverTargetTestCase (std::string name, Vector u
uint16_t nEnb = gridSizeX * gridSizeY;
if ((sourceCellId < 0) && (sourceCellId > nEnb))
if (sourceCellId > nEnb)
{
NS_FATAL_ERROR ("Invalid source cell ID " << sourceCellId);
}
if ((targetCellId < 0) && (targetCellId > nEnb))
if (targetCellId > nEnb)
{
NS_FATAL_ERROR ("Invalid target cell ID " << targetCellId);
}