[glom/glom-1-30] Base_DB: Remove an unused get_field_primary_key_for_table().



commit a21e18a24d6614414591dfc987c749c90f484677
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 1525f62..aaa7d02 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -561,31 +561,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 ccbe057..1739859 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]