diff libinterp/parse-tree/bp-table.cc @ 25337:3ff9192b676e

use auto keyword to declare iterator variables where possible * dialog.cc, files-dock-widget.cc, history-dock-widget.cc, file-editor.cc, octave-qt-link.cc, call-stack.cc, debug.cc, dynamic-ld.cc, fcn-info.cc, fcn-info.h, genprops.awk, graphics.cc, gtk-manager.cc, gtk-manager.h, hook-fcn.h, load-path.cc, load-save.cc, ls-mat5.cc, mex.cc, oct-map.cc, oct-stream.cc, octave-link.cc, regexp.cc, symscope.h, symtab.h, txt-eng.h, url-handle-manager.cc, variables.cc, ov-base.cc, ov-class.cc, ov-classdef.cc, ov-fcn-handle.cc, ov-java.cc, ov-struct.cc, bp-table.cc, jit-ir.cc, jit-typeinfo.cc, pt-arg-list.cc, pt-arg-list.h, pt-array-list.cc, pt-check.cc, pt-classdef.cc, pt-decl.h, pt-eval.cc, pt-idx.cc, pt-jit.cc, pt-misc.cc, pt-pr-code.cc, pt-select.h, pt-stmt.h, caseless-str.h, lo-regexp.cc: Use auto keyword to declare iterator variables where possible. Style fixes.
author John W. Eaton <jwe@octave.org>
date Wed, 02 May 2018 01:36:20 -0400
parents 389757b7b6af
children 416856765a55
line wrap: on
line diff
--- a/libinterp/parse-tree/bp-table.cc	Wed May 02 00:30:00 2018 -0400
+++ b/libinterp/parse-tree/bp-table.cc	Wed May 02 01:36:20 2018 -0400
@@ -572,7 +572,7 @@
 
     for (int i = 0; i < len; i++)
       {
-        const_intmap_iterator m = line.find (i);
+        auto m = line.find (i);
 
         if (m != line.end ())
           {
@@ -617,7 +617,7 @@
 
             for (int i = 0; i < len; i++)
               {
-                const_intmap_iterator p = line.find (i);
+                auto p = line.find (i);
 
                 if (p != line.end ())
                   {
@@ -632,7 +632,7 @@
 
             results = cmds->list_breakpoints ();
 
-            bp_set_iterator it = m_bp_set.find (fname);
+            auto it = m_bp_set.find (fname);
             if (results.empty () && it != m_bp_set.end ())
               m_bp_set.erase (it);
           }
@@ -711,7 +711,7 @@
           {
             retval = cmds->remove_all_breakpoints (file);
 
-            bp_set_iterator it = m_bp_set.find (fname);
+            auto it = m_bp_set.find (fname);
             if (it != m_bp_set.end ())
               m_bp_set.erase (it);
           }
@@ -728,9 +728,8 @@
   void bp_table::remove_all_breakpoints (void)
   {
     // Odd loop structure required because delete will invalidate m_bp_set iterators
-    for (const_bp_set_iterator it = m_bp_set.begin (), it_next = it;
-         it != m_bp_set.end ();
-         it = it_next)
+    for (auto it = m_bp_set.begin (), it_next = it;
+         it != m_bp_set.end (); it = it_next)
       {
         ++it_next;
         remove_all_breakpoints_in_file (*it);