# HG changeset patch # User John W. Eaton # Date 1648099622 14400 # Node ID 2f2e875d93fab5279c8760d504b16e8993e1eb76 # Parent df26decca96bc6a01dd70e9244bd034097c97776 don't use mutable keyword for load_path data members * load-path.h, load-path.cc (load_path::m_package_map, load_path::m_top_level_package, load_path::m_dir_info_list, load_path::m_init_dirs): Don't declare data members as mutable. (load_path::update, load_path::add, load_path::get_package): Don't declare as const functions. diff -r df26decca96b -r 2f2e875d93fa libinterp/corefcn/load-path.cc --- a/libinterp/corefcn/load-path.cc Wed Mar 23 18:27:53 2022 +0100 +++ b/libinterp/corefcn/load-path.cc Thu Mar 24 01:27:02 2022 -0400 @@ -454,7 +454,7 @@ } void - load_path::update (void) const + load_path::update (void) { // I don't see a better way to do this because we need to // preserve the correct directory ordering for new files that @@ -1286,7 +1286,7 @@ void load_path::add (const dir_info& di, bool at_end, - const std::string& pname, bool updating) const + const std::string& pname, bool updating) { package_info& l = get_package (pname); diff -r df26decca96b -r 2f2e875d93fa libinterp/corefcn/load-path.h --- a/libinterp/corefcn/load-path.h Wed Mar 23 18:27:53 2022 +0100 +++ b/libinterp/corefcn/load-path.h Thu Mar 24 01:27:02 2022 -0400 @@ -69,7 +69,7 @@ bool remove (const std::string& dir); - void update (void) const; + void update (void); bool contains_canonical (const std::string& dir_name) const; @@ -536,11 +536,11 @@ void add (const std::string& dir, bool at_end, bool warn); void add (const dir_info& di, bool at_end, const std::string& pname = "", - bool updating = false) const; + bool updating = false); bool is_package (const std::string& name) const; - package_info& get_package (const std::string& name) const + package_info& get_package (const std::string& name) { if (! name.empty () && is_package (name)) { @@ -568,13 +568,13 @@ interpreter& m_interpreter; - mutable package_map_type m_package_map; + package_map_type m_package_map; - mutable package_info m_top_level_package; + package_info m_top_level_package; - mutable dir_info_list_type m_dir_info_list; + dir_info_list_type m_dir_info_list; - mutable std::set m_init_dirs; + std::set m_init_dirs; std::string m_command_line_path;