[glom] tiny const changes.



commit 40e80f995999cd6629b68ce8bbc22d9d35cc172f
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Dec 8 21:37:29 2011 +0100

    tiny const changes.

 glom/libglom/data_structure/fieldtypes.cc |    4 +++-
 glom/libglom/db_utils.cc                  |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/glom/libglom/data_structure/fieldtypes.cc b/glom/libglom/data_structure/fieldtypes.cc
index bf6ffaa..82b539a 100644
--- a/glom/libglom/data_structure/fieldtypes.cc
+++ b/glom/libglom/data_structure/fieldtypes.cc
@@ -45,7 +45,9 @@ FieldTypes::FieldTypes(const Glib::RefPtr<Gnome::Gda::Connection>& gda_connectio
     //This first call to update_meta_store() is also necessary for other calls to get_meta_store_data() elsewhere to succeed.
     Glib::RefPtr<Gnome::Gda::DataModel> data_model_tables;
     if(true) //Already done in ConnectionPool::connect(): gda_connection->update_meta_store())
+    {
       data_model_tables = gda_connection->get_meta_store_data(Gnome::Gda::CONNECTION_META_TYPES);
+    }
 
     if(!data_model_tables)
       std::cerr << G_STRFUNC << ": Couldn't get datamodel" << std::endl;
@@ -56,7 +58,7 @@ FieldTypes::FieldTypes(const Glib::RefPtr<Gnome::Gda::Connection>& gda_connectio
     }
     else if(data_model_tables)
     {
-      int rows = data_model_tables->get_n_rows();
+      const int rows = data_model_tables->get_n_rows();
       if(!rows)
         std::cerr << G_STRFUNC << ": no rows from CONNECTION_META_TYPES" << std::endl;
 
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index 0fb48f6..358d983 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -1126,7 +1126,7 @@ bool get_table_exists_in_database(const Glib::ustring& table_name)
 {
   //TODO_Performance
 
-  type_vec_strings tables = get_table_names_from_database();
+  const type_vec_strings tables = get_table_names_from_database();
   type_vec_strings::const_iterator iterFind = std::find(tables.begin(), tables.end(), table_name);
   return (iterFind != tables.end());
 }



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