[glom] Remove unnecessary typedefs.



commit 057767a2a3825badb51c2a61cb2f8606e7b12dfc
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Nov 6 12:17:41 2016 +0100

    Remove unnecessary typedefs.
    
    These were useful before we used auto with C++11.

 glom/import_csv/dialog_import_csv_progress.h       |    3 +--
 glom/libglom/data_structure/fieldtypes.h           |    6 ++----
 glom/libglom/data_structure/groupinfo.h            |    3 +--
 glom/libglom/document/document.h                   |   14 +++++++-------
 glom/mode_data/box_data_calendar_related.h         |    5 ++---
 glom/mode_data/datawidget/combo_as_radio_buttons.h |    3 +--
 glom/mode_data/datawidget/treemodel_db.h           |    3 +--
 glom/mode_design/iso_codes.cc                      |   12 ++++++------
 .../relationships_overview/canvas_group_dbtable.h  |    3 +--
 glom/print_layout/canvas_print_layout.cc           |    3 +--
 10 files changed, 23 insertions(+), 32 deletions(-)
---
diff --git a/glom/import_csv/dialog_import_csv_progress.h b/glom/import_csv/dialog_import_csv_progress.h
index 5eac744..660a440 100644
--- a/glom/import_csv/dialog_import_csv_progress.h
+++ b/glom/import_csv/dialog_import_csv_progress.h
@@ -72,8 +72,7 @@ private:
   // We use this for implementing get_entered_field_data and
   // set_entered_field_data, required by Base_DB_Table_Data::record_new().
   // It just holds the values for the fields in the current row.
-  typedef std::unordered_map<Glib::ustring, Gnome::Gda::Value, std::hash<std::string>> type_mapValues;
-  type_mapValues m_current_row_values;
+  std::unordered_map<Glib::ustring, Gnome::Gda::Value, std::hash<std::string>> m_current_row_values;
 
   Gtk::ProgressBar* m_progress_bar;
   Gtk::TextView* m_text_view;
diff --git a/glom/libglom/data_structure/fieldtypes.h b/glom/libglom/data_structure/fieldtypes.h
index a8a9c1b..c8820ca 100644
--- a/glom/libglom/data_structure/fieldtypes.h
+++ b/glom/libglom/data_structure/fieldtypes.h
@@ -48,12 +48,10 @@ private:
   void fill_with_default_data();
 
   //Duplicate information, to make searching easier:
-  typedef std::unordered_map<GType, Glib::ustring> type_mapGdaTypesToSchemaStrings;
-  type_mapGdaTypesToSchemaStrings m_mapGdaTypesToSchemaStrings;
+  std::unordered_map<GType, Glib::ustring> m_mapGdaTypesToSchemaStrings;
 
   //Fallback types used if the database system does not support a type natively
-  typedef std::unordered_map<GType, GType> type_mapFallbackTypes;
-  type_mapFallbackTypes m_mapFallbackTypes;
+  std::unordered_map<GType, GType> m_mapFallbackTypes;
 };
 
 } //namespace Glom
diff --git a/glom/libglom/data_structure/groupinfo.h b/glom/libglom/data_structure/groupinfo.h
index 1b00fc0..61a16af 100644
--- a/glom/libglom/data_structure/groupinfo.h
+++ b/glom/libglom/data_structure/groupinfo.h
@@ -43,8 +43,7 @@ public:
 
   bool m_developer; //m_privs is ignored if this is true.
 
-  typedef std::unordered_map<Glib::ustring, Privileges, std::hash<std::string>> type_map_table_privileges;
-  type_map_table_privileges m_map_privileges;
+  std::unordered_map<Glib::ustring, Privileges, std::hash<std::string>> m_map_privileges;
 
   //typedef std::vector<Glib::ustring> type_users;
   //type_users m_users;
diff --git a/glom/libglom/document/document.h b/glom/libglom/document/document.h
index 41c5285..cc0e93e 100644
--- a/glom/libglom/document/document.h
+++ b/glom/libglom/document/document.h
@@ -602,18 +602,18 @@ private:
     typedef std::vector< LayoutInfo > type_layouts;
     type_layouts m_layouts;
 
-    typedef std::unordered_map< Glib::ustring, std::shared_ptr<Report> > type_reports; //map of report names 
to reports
-    type_reports m_reports;
+    // map of report names to reports
+    std::unordered_map<Glib::ustring, std::shared_ptr<Report>> m_reports;
 
-    typedef std::unordered_map< Glib::ustring, std::shared_ptr<PrintLayout> > type_print_layouts; //map of 
print layout names to print layouts
-    type_print_layouts m_print_layouts;
+    // map of print layout names to print layouts
+    std::unordered_map< Glib::ustring, std::shared_ptr<PrintLayout>> m_print_layouts;
 
     //Example data, used when creating a database from an example.
     type_example_rows m_example_rows;
 
-    //Per-session, not saved in document:
-    typedef std::unordered_map<Glib::ustring, Gnome::Gda::Value, std::hash<std::string>> 
type_map_layout_primarykeys;
-    type_map_layout_primarykeys m_map_current_record; //The record last viewed in each layout.
+    // Per-session, not saved in document:
+    // The record last viewed in each layout.
+    std::unordered_map<Glib::ustring, Gnome::Gda::Value, std::hash<std::string>> m_map_current_record;
     Glib::ustring m_layout_current;
     FoundSet m_foundset_current;
 
diff --git a/glom/mode_data/box_data_calendar_related.h b/glom/mode_data/box_data_calendar_related.h
index 3fb2081..3684a89 100644
--- a/glom/mode_data/box_data_calendar_related.h
+++ b/glom/mode_data/box_data_calendar_related.h
@@ -104,10 +104,9 @@ private:
   //  std::tm ctm;
   //  return std::hash<std::tm>()(ctm);
   //};
-  //typedef std::unordered_map<Glib::Date, type_list_vectors, decltype(date_hash)> type_map_values;
-  typedef std::map<Glib::Date, type_list_vectors> type_map_values;
+  //std::unordered_map<Glib::Date, type_list_vectors, decltype(date_hash)> m_map_values;
+  std::map<Glib::Date, type_list_vectors> m_map_values;
 
-  type_map_values m_map_values;
   mutable int m_query_column_date_field;
 };
 
diff --git a/glom/mode_data/datawidget/combo_as_radio_buttons.h 
b/glom/mode_data/datawidget/combo_as_radio_buttons.h
index 06594d3..cc8cd7f 100644
--- a/glom/mode_data/datawidget/combo_as_radio_buttons.h
+++ b/glom/mode_data/datawidget/combo_as_radio_buttons.h
@@ -92,8 +92,7 @@ private:
 
   Glib::ustring m_old_text;
 
-  typedef std::unordered_map<Glib::ustring, Gtk::RadioButton*, std::hash<std::string>> type_map_buttons;
-  type_map_buttons m_map_buttons;
+  std::unordered_map<Glib::ustring, Gtk::RadioButton*, std::hash<std::string>> m_map_buttons;
 };
 
 } //namespace DataWidetChildren
diff --git a/glom/mode_data/datawidget/treemodel_db.h b/glom/mode_data/datawidget/treemodel_db.h
index 504b21c..77b89ec 100644
--- a/glom/mode_data/datawidget/treemodel_db.h
+++ b/glom/mode_data/datawidget/treemodel_db.h
@@ -42,8 +42,7 @@ public:
   //Field Values. We store them here after reading them from the database,
   //so that we can change them without changing them in the database immediately.
   //This is a duplication of data but at least we are still only getting the _rows_ that will be displayed. 
//TODO_Performance?
-  typedef std::unordered_map<int, DbValue > type_vec_values;
-  type_vec_values m_db_values;
+  std::unordered_map<int, DbValue > m_db_values;
 
   ///Gets the values from the database if necessary.
   DbValue get_value(DbTreeModel& model, int column, int row);
diff --git a/glom/mode_design/iso_codes.cc b/glom/mode_design/iso_codes.cc
index 6cbbcff..2521708 100644
--- a/glom/mode_design/iso_codes.cc
+++ b/glom/mode_design/iso_codes.cc
@@ -142,9 +142,9 @@ Glib::ustring get_locale_name(const Glib::ustring& locale_id)
       Utils::add_unique(list_ids, id);
     }
 
-    //Get the (translated) language names:
-    typedef std::unordered_map<Glib::ustring, Glib::ustring, std::hash<std::string>> type_map_language; //ID 
to language name.
-    type_map_language map_languages;
+    // Get the (translated) language names:
+    // ID to language name.
+    std::unordered_map<Glib::ustring, Glib::ustring, std::hash<std::string>> map_languages;
 
     const std::string filename_languages = ISO_CODES_PREFIX "/share/xml/iso-codes/iso_639.xml";
 
@@ -192,9 +192,9 @@ Glib::ustring get_locale_name(const Glib::ustring& locale_id)
       std::cerr << G_STRFUNC << ": Exception while parsing iso codes (locales): " << ex.what() << std::endl;
     }
 
-    //Get the (translated) country names:
-    typedef std::unordered_map<Glib::ustring, Glib::ustring, std::hash<std::string>> type_map_country; //ID 
to country name.
-    type_map_country map_country;
+    // Get the (translated) country names:
+    // ID to country name.
+    std::unordered_map<Glib::ustring, Glib::ustring, std::hash<std::string>> map_country;
 
     const Glib::ustring filename_countries = ISO_CODES_PREFIX "/share/xml/iso-codes/iso_3166.xml";
 
diff --git a/glom/mode_design/relationships_overview/canvas_group_dbtable.h 
b/glom/mode_design/relationships_overview/canvas_group_dbtable.h
index 15d47dd..76373a5 100644
--- a/glom/mode_design/relationships_overview/canvas_group_dbtable.h
+++ b/glom/mode_design/relationships_overview/canvas_group_dbtable.h
@@ -48,8 +48,7 @@ private:
    double m_table_height;
    static double m_table_width;
 
-   typedef std::unordered_map <Glib::ustring, double> type_map_fields_y;
-   type_map_fields_y m_map_fields_y;
+   std::unordered_map <Glib::ustring, double> m_map_fields_y;
 };
 
 } //namespace Glom
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index 8ff0f56..5456d8e 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -744,8 +744,7 @@ void Canvas_PrintLayout::fill_with_data_system_preferences(const Glib::RefPtr<Ca
 void Canvas_PrintLayout::fill_with_data(const Glib::RefPtr<Goocanvas::Group>& canvas_group, const FoundSet& 
found_set, bool avoid_page_margins)
 {
   //A map of the text representation (e.g. field_name or relationship::field_name) to the index:
-  typedef std::unordered_map<Glib::ustring, guint, std::hash<std::string>> type_map_layout_fields_index;
-  type_map_layout_fields_index map_fields_index;
+  std::unordered_map<Glib::ustring, guint, std::hash<std::string>> map_fields_index;
 
   //Get list of fields to get from the database.
   SqlUtils::type_vecLayoutFields fieldsToGet;


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