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

Unified Diff: src/traffic-control/helper/traffic-control-helper.cc

Issue 333080043: Eliminate Visual Studio complier warnings (Closed)
Patch Set: Patch updates for x64 build Created 6 years, 2 months 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/traffic-control/helper/queue-disc-container.cc ('k') | src/traffic-control/model/codel-queue-disc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/traffic-control/helper/traffic-control-helper.cc
===================================================================
--- a/src/traffic-control/helper/traffic-control-helper.cc
+++ b/src/traffic-control/helper/traffic-control-helper.cc
@@ -53,7 +53,7 @@
QueueDiscFactory::AddQueueDiscClass (ObjectFactory factory)
{
m_queueDiscClassesFactory.push_back (factory);
- return m_queueDiscClassesFactory.size () - 1;
+ return static_cast<uint16_t>(m_queueDiscClassesFactory.size () - 1);
}
void
@@ -85,7 +85,7 @@
}
// create and add the queue disc classes
- for (uint32_t i = 0; i < m_queueDiscClassesFactory.size (); i++)
+ for (uint16_t i = 0; i < m_queueDiscClassesFactory.size (); i++)
{
// the class ID is given by the index i of the vector
NS_ABORT_MSG_IF (m_classIdChildHandleMap.find (i) == m_classIdChildHandleMap.end (),
@@ -293,7 +293,7 @@
factory.Set (n14, v14);
factory.Set (n15, v15);
- uint16_t childHandle = m_queueDiscFactory.size ();
+ uint16_t childHandle = static_cast<uint16_t>(m_queueDiscFactory.size ());
m_queueDiscFactory.push_back (QueueDiscFactory (factory));
m_queueDiscFactory[handle].SetChildQueueDisc (classId, childHandle);
@@ -367,7 +367,7 @@
m_queueDiscs.resize (m_queueDiscFactory.size ());
// Create queue discs (from leaves to root)
- for (int i = m_queueDiscFactory.size () - 1; i >= 0; i--)
+ for (int i = static_cast<int>(m_queueDiscFactory.size ()) - 1; i >= 0; i--)
{
Ptr<QueueDisc> q = m_queueDiscFactory[i].CreateQueueDisc (m_queueDiscs);
q->SetNetDevice (d);
« no previous file with comments | « src/traffic-control/helper/queue-disc-container.cc ('k') | src/traffic-control/model/codel-queue-disc.cc » ('j') | no next file with comments »

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