Mercurial > octave
comparison libinterp/corefcn/load-path.h @ 30861:2f2e875d93fa stable
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.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 24 Mar 2022 01:27:02 -0400 |
parents | 796f54d4ddbf |
children | e88a07dec498 |
comparison
equal
deleted
inserted
replaced
30859:df26decca96b | 30861:2f2e875d93fa |
---|---|
67 | 67 |
68 void prepend (const std::string& dir, bool warn = false); | 68 void prepend (const std::string& dir, bool warn = false); |
69 | 69 |
70 bool remove (const std::string& dir); | 70 bool remove (const std::string& dir); |
71 | 71 |
72 void update (void) const; | 72 void update (void); |
73 | 73 |
74 bool contains_canonical (const std::string& dir_name) const; | 74 bool contains_canonical (const std::string& dir_name) const; |
75 | 75 |
76 bool contains_file_in_dir (const std::string& file_name, | 76 bool contains_file_in_dir (const std::string& file_name, |
77 const std::string& dir_name); | 77 const std::string& dir_name); |
534 void remove (const dir_info& di, const std::string& pname = ""); | 534 void remove (const dir_info& di, const std::string& pname = ""); |
535 | 535 |
536 void add (const std::string& dir, bool at_end, bool warn); | 536 void add (const std::string& dir, bool at_end, bool warn); |
537 | 537 |
538 void add (const dir_info& di, bool at_end, const std::string& pname = "", | 538 void add (const dir_info& di, bool at_end, const std::string& pname = "", |
539 bool updating = false) const; | 539 bool updating = false); |
540 | 540 |
541 bool is_package (const std::string& name) const; | 541 bool is_package (const std::string& name) const; |
542 | 542 |
543 package_info& get_package (const std::string& name) const | 543 package_info& get_package (const std::string& name) |
544 { | 544 { |
545 if (! name.empty () && is_package (name)) | 545 if (! name.empty () && is_package (name)) |
546 { | 546 { |
547 package_map_iterator l = m_package_map.find (name); | 547 package_map_iterator l = m_package_map.find (name); |
548 | 548 |
566 | 566 |
567 static abs_dir_cache_type s_abs_dir_cache; | 567 static abs_dir_cache_type s_abs_dir_cache; |
568 | 568 |
569 interpreter& m_interpreter; | 569 interpreter& m_interpreter; |
570 | 570 |
571 mutable package_map_type m_package_map; | 571 package_map_type m_package_map; |
572 | 572 |
573 mutable package_info m_top_level_package; | 573 package_info m_top_level_package; |
574 | 574 |
575 mutable dir_info_list_type m_dir_info_list; | 575 dir_info_list_type m_dir_info_list; |
576 | 576 |
577 mutable std::set<std::string> m_init_dirs; | 577 std::set<std::string> m_init_dirs; |
578 | 578 |
579 std::string m_command_line_path; | 579 std::string m_command_line_path; |
580 | 580 |
581 }; | 581 }; |
582 | 582 |