[glom] Base_DB: Remove an unused get_field_primary_key_for_table().



commit 3c1d01f1e82a73c7e4e40bc7fdb3c2eb83983fed
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 9 15:18:53 2016 +0100

    Base_DB: Remove an unused get_field_primary_key_for_table().

 glom/base_db.cc |   25 -------------------------
 glom/base_db.h  |    1 -
 2 files changed, 0 insertions(+), 26 deletions(-)
---
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 1c66390..2d0ca97 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -529,31 +529,6 @@ bool Base_DB::get_field_primary_key_index_for_fields(const type_vec_fields& fiel
   return false; //Not found.
 }
 
-//static:
-bool Base_DB::get_field_primary_key_index_for_fields(const type_vecLayoutFields& fields, guint& field_column)
-{
-  //Initialize input parameter:
-  field_column = 0;
-
-  //TODO_performance: Cache the primary key?
-  guint col = 0;
-  guint cols_count = fields.size();
-  while(col < cols_count)
-  {
-    if(fields[col]->get_full_field_details()->get_primary_key())
-    {
-      field_column = col;
-      return true;
-    }
-    else
-    {
-      ++col;
-    }
-  }
-
-  return false; //Not found.
-}
-
 std::shared_ptr<Field> Base_DB::get_field_primary_key_for_table(const Glib::ustring& table_name) const
 {
   const auto document = get_document();
diff --git a/glom/base_db.h b/glom/base_db.h
index 14da782..078052a 100644
--- a/glom/base_db.h
+++ b/glom/base_db.h
@@ -292,7 +292,6 @@ protected:
   static Glib::RefPtr<Gnome::Gda::Connection> get_connection();
 
   static bool get_field_primary_key_index_for_fields(const type_vec_fields& fields, guint& field_column);
-  static bool get_field_primary_key_index_for_fields(const type_vecLayoutFields& fields, guint& 
field_column);
 
   typedef std::vector<Glib::ustring> type_vec_strings;
   static type_vec_strings util_vecStrings_from_Fields(const type_vec_fields& fields);


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