Preincrement iterators for better performance
authorJaap Keuter <jaap.keuter@xs4all.nl>
Thu, 7 Jun 2018 12:45:41 +0000 (14:45 +0200)
committerGerald Combs <gerald@wireshark.org>
Thu, 7 Jun 2018 18:18:04 +0000 (18:18 +0000)
Change-Id: I26853080bd0294a9058db99a30d1c06d6aac8e16
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/28083
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
ui/qt/lbm_lbtrm_transport_dialog.cpp
ui/qt/models/decode_as_delegate.cpp

index 3b18f7a9a67ca9c09b472c8f203efec34d8fb19c..dadbb1665b654bb821197170e95fd09d5bee65b6 100644 (file)
@@ -193,7 +193,7 @@ LBMLBTRMSQNEntry::LBMLBTRMSQNEntry(guint32 sqn) :
 
 LBMLBTRMSQNEntry::~LBMLBTRMSQNEntry(void)
 {
-    for (LBMLBTRMFrameMapIterator it = m_frames.begin(); it != m_frames.end(); it++)
+    for (LBMLBTRMFrameMapIterator it = m_frames.begin(); it != m_frames.end(); ++it)
     {
         delete *it;
     }
@@ -266,7 +266,7 @@ LBMLBTRMNCFReasonEntry::LBMLBTRMNCFReasonEntry(guint8 reason) :
 
 LBMLBTRMNCFReasonEntry::~LBMLBTRMNCFReasonEntry(void)
 {
-    for (LBMLBTRMFrameMapIterator it = m_frames.begin(); it != m_frames.end(); it++)
+    for (LBMLBTRMFrameMapIterator it = m_frames.begin(); it != m_frames.end(); ++it)
     {
         delete *it;
     }
@@ -323,7 +323,7 @@ LBMLBTRMNCFSQNEntry::LBMLBTRMNCFSQNEntry(guint32 sqn) :
 
 LBMLBTRMNCFSQNEntry::~LBMLBTRMNCFSQNEntry(void)
 {
-    for (LBMLBTRMNCFReasonMapIterator it = m_reasons.begin(); it != m_reasons.end(); it++)
+    for (LBMLBTRMNCFReasonMapIterator it = m_reasons.begin(); it != m_reasons.end(); ++it)
     {
         delete *it;
     }
index 659492a840b09920296da88d8a8363b1f3293582..e57676c768dae11680bad586821b36d8370e2010 100644 (file)
@@ -267,7 +267,7 @@ QWidget* DecodeAsDelegate::createEditor(QWidget *parentWidget, const QStyleOptio
 
         //QMap already sorts the keys (protocols) alphabetically
         QMap<QString, dissector_info_t*>::iterator protocol;
-        for(protocol = protocols.begin(); protocol != protocols.end(); protocol++)
+        for(protocol = protocols.begin(); protocol != protocols.end(); ++protocol)
         {
             editor->addItem(protocol.key(), VariantPointer<dissector_info_t>::asQVariant(protocol.value()));
         }