[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>()
}
- [lmi-commits] [lmi] master 193e804 01/46: Refactor census view to enable several implementations, (continued)
- [lmi-commits] [lmi] master 193e804 01/46: Refactor census view to enable several implementations, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master c094807 05/46: Remove unnecessary altColor_ member variable, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 3d86a92 06/46: Use simpler wxGrid::AssignTable(), Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master c9e743f 08/46: Remove extra blank line from census_view.hpp, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master ba15191 11/46: Stop using wxRTTI in DatumSequenceEditorEvtHandler, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 5ee4b04 13/46: Improve comments in DatumSequenceEditorEvtHandler, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 03d33ab 14/46: Make DatumSequenceEditorEvtHandler::entry_ const, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 0e2a694 16/46: Replace DatumSequenceEditorEvtHandler with a lambda, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 3e9f8af 02/46: Add census_view variant with wxGrid, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 804111d 04/46: Remove unnecessary use of std::swap(), Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 25a989e 10/46: Make table_type_converter::get_all() map const,
Greg Chicares <=
- [lmi-commits] [lmi] master 12940dc 09/46: Define static map in more compact way, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master e1fdb77 12/46: Use Bind() in DatumSequenceEditorEvtHandler, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 7e048d0 15/46: Remove apparently unnecessary wxEVT_CHAR handler, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 7b62d49 21/46: Rename table_type_converter::get_by_value() to just get(), Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 1dacd5c 22/46: Move register_all() to table_custom_type_converter, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master a43eb0f 23/46: Add a comment explaining register_all() approach, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 4dcae52 34/46: Don't change default wxGrid lines colour, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 342b9f5 27/46: Always resize columns in CensusGridView::update_visible_columns(), Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master f217203 29/46: Rename "columns_count" to "old_columns_count" for consistency, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 395e268 41/46: Remove unnecessary calls to Update() when toggling autosize, Greg Chicares, 2020/07/22