lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 25a989e 10/46: Make table_type_converter::get


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 25a989e 10/46: Make table_type_converter::get_all() map const
Date: Wed, 22 Jul 2020 11:05:10 -0400 (EDT)

branch: master
commit 25a989ef472a799b8f1ffbb5dc167f55b1d35bb2
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Vadim Zeitlin <vadim@tt-solutions.com>

    Make table_type_converter::get_all() map const
    
    This map collects all type converters defined at compilation time and
    never changes, so it should be const.
---
 census_view.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/census_view.cpp b/census_view.cpp
index 782ed35..4f0bd45 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -1234,7 +1234,7 @@ class table_type_converter
 
     virtual void register_data_type(wxGrid* grid) const = 0;
 
-    static std::map<std::string, table_type_converter const*>& get_all();
+    static std::map<std::string, table_type_converter const*> const& get_all();
     static table_type_converter const& get_by_value(any_member<Input> const& 
value);
 
   private:
@@ -1441,10 +1441,10 @@ class table_string_converter : public 
table_standard_type_converter
     }
 };
 
-std::map<std::string, table_type_converter const*>&
+std::map<std::string, table_type_converter const*> const&
 table_type_converter::get_all()
 {
-    static std::map<std::string, table_type_converter const*> all
+    static std::map<std::string, table_type_converter const*> const all
         {{ get_impl<table_bool_converter>().type()
          ,&get_impl<table_bool_converter>()
          }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]