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

Unified Diff: src/wave/model/bsm-application.cc

Issue 337010043: Eliminate Visual Studio compiler warnings (Closed)
Patch Set: Update patch per coding style requirements 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
« no previous file with comments | « src/wave/model/bsm-application.h ('k') | src/wave/model/channel-coordinator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wave/model/bsm-application.cc
===================================================================
--- a/src/wave/model/bsm-application.cc
+++ b/src/wave/model/bsm-application.cc
@@ -32,7 +32,7 @@
namespace ns3 {
// (Arbitrary) port for establishing socket to transmit WAVE BSMs
-int BsmApplication::wavePort = 9080;
+uint16_t BsmApplication::wavePort = 9080;
NS_OBJECT_ENSURE_REGISTERED (BsmApplication);
@@ -151,7 +151,7 @@
// is some GPS sync accuracy on GPS devices,
// typically 40-100 ns.
// Get a uniformly random number for GPS sync accuracy, in ns.
- Time tDrift = NanoSeconds (m_unirv->GetInteger (0, m_gpsAccuracyNs));
+ Time tDrift = NanoSeconds (m_unirv->GetInteger (0, static_cast<uint32_t> (m_gpsAccuracyNs)));
// When transmitting at a default rate of 10 Hz,
// the subsystem shall transmit every 100 ms +/-
@@ -201,7 +201,7 @@
m_wavePacketSize = wavePacketSize;
m_waveInterval = waveInterval;
m_gpsAccuracyNs = gpsAccuracyNs;
- int size = rangesSq.size ();
+ int size = static_cast<int> (rangesSq.size ());
m_waveBsmStats = waveBsmStats;
m_nodesMoving = nodesMoving;
m_chAccessMode = chAccessMode;
@@ -275,7 +275,7 @@
if (distSq > 0.0)
{
// dest node within range?
- int rangeCount = m_txSafetyRangesSq.size ();
+ int rangeCount = static_cast<int> (m_txSafetyRangesSq.size ());
for (int index = 1; index <= rangeCount; index++)
{
if (distSq <= m_txSafetyRangesSq[index - 1])
@@ -360,7 +360,7 @@
double rxDistSq = MobilityHelper::GetDistanceSquaredBetween (rxNode, txNode);
if (rxDistSq > 0.0)
{
- int rangeCount = m_txSafetyRangesSq.size ();
+ int rangeCount = static_cast<int> (m_txSafetyRangesSq.size ());
for (int index = 1; index <= rangeCount; index++)
{
if (rxDistSq <= m_txSafetyRangesSq[index - 1])
« no previous file with comments | « src/wave/model/bsm-application.h ('k') | src/wave/model/channel-coordinator.cc » ('j') | no next file with comments »

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