Mercurial > octave
diff libinterp/parse-tree/pt-pr-code.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 | 6652d3823428 |
children | cb1606f78f6b |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-pr-code.cc Wed May 02 00:30:00 2018 -0400 +++ b/libinterp/parse-tree/pt-pr-code.cc Wed May 02 01:36:20 2018 -0400 @@ -60,7 +60,7 @@ void tree_print_code::visit_argument_list (tree_argument_list& lst) { - tree_argument_list::iterator p = lst.begin (); + auto p = lst.begin (); while (p != lst.end ()) { @@ -163,7 +163,7 @@ void tree_print_code::visit_decl_init_list (tree_decl_init_list& lst) { - tree_decl_init_list::iterator p = lst.begin (); + auto p = lst.begin (); while (p != lst.end ()) { @@ -495,7 +495,7 @@ void tree_print_code::visit_if_command_list (tree_if_command_list& lst) { - tree_if_command_list::iterator p = lst.begin (); + auto p = lst.begin (); bool first_elt = true; @@ -542,8 +542,8 @@ int n = type_tags.length (); - std::list<tree_argument_list *>::iterator p_arg_lists = arg_lists.begin (); - std::list<string_vector>::iterator p_arg_names = arg_names.begin (); + auto p_arg_lists = arg_lists.begin (); + auto p_arg_names = arg_names.begin (); for (int i = 0; i < n; i++) { @@ -616,7 +616,7 @@ m_os << '['; m_nesting.push ('['); - tree_matrix::iterator p = lst.begin (); + auto p = lst.begin (); while (p != lst.end ()) { @@ -647,7 +647,7 @@ m_os << '{'; m_nesting.push ('{'); - tree_cell::iterator p = lst.begin (); + auto p = lst.begin (); while (p != lst.end ()) { @@ -756,7 +756,7 @@ void tree_print_code::visit_parameter_list (tree_parameter_list& lst) { - tree_parameter_list::iterator p = lst.begin (); + auto p = lst.begin (); while (p != lst.end ()) { @@ -817,7 +817,7 @@ void tree_print_code::visit_return_list (tree_return_list& lst) { - tree_return_list::iterator p = lst.begin (); + auto p = lst.begin (); while (p != lst.end ()) { @@ -933,7 +933,7 @@ void tree_print_code::visit_switch_case_list (tree_switch_case_list& lst) { - tree_switch_case_list::iterator p = lst.begin (); + auto p = lst.begin (); while (p != lst.end ()) { @@ -1282,7 +1282,7 @@ { if (comment_list) { - comment_list::iterator p = comment_list->begin (); + auto p = comment_list->begin (); while (p != comment_list->end ()) {