changeset 26658:fc7d72df08fa

add const qualifiers to two symbol_info methods * syminfo.h, syminfo.cc (symbol_info::parse_whos_line_format, symbol_info::display): Now const methods.
author John W. Eaton <jwe@octave.org>
date Sat, 26 Jan 2019 15:36:16 +0000
parents be909a861e52
children 8fbda39ca075
files libinterp/corefcn/syminfo.cc libinterp/corefcn/syminfo.h
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/syminfo.cc	Sat Jan 26 15:35:09 2019 +0000
+++ b/libinterp/corefcn/syminfo.cc	Sat Jan 26 15:36:16 2019 +0000
@@ -324,7 +324,8 @@
     os << param_buf.str ();
   }
 
-  void symbol_info_list::display (std::ostream& os, const std::string& format)
+  void symbol_info_list::display (std::ostream& os,
+                                  const std::string& format) const
   {
     if (! m_lst.empty ())
       {
@@ -355,7 +356,7 @@
   }
 
   std::list<whos_parameter>
-  symbol_info_list::parse_whos_line_format (const std::string& format)
+  symbol_info_list::parse_whos_line_format (const std::string& format) const
   {
     int idx;
     size_t format_len = format.length ();
--- a/libinterp/corefcn/syminfo.h	Sat Jan 26 15:35:09 2019 +0000
+++ b/libinterp/corefcn/syminfo.h	Sat Jan 26 15:36:16 2019 +0000
@@ -109,13 +109,13 @@
     void print_descriptor (std::ostream& os,
                            const std::list<whos_parameter> params) const;
 
-    void display (std::ostream& os, const std::string& format);
+    void display (std::ostream& os, const std::string& format) const;
 
     // Parse FORMAT, and return a parameter list,
     // containing all information needed to print the given
     // attributes of the symbols.
     std::list<whos_parameter>
-    parse_whos_line_format (const std::string& format);
+    parse_whos_line_format (const std::string& format) const;
   };
 }