[glom/glom-1-32] Document::change_relationship_name(): Avoid a vector copy.



commit 70b405a2b141812b0505a1491a3e880c12d6d380
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Jun 20 20:37:18 2017 +0200

    Document::change_relationship_name(): Avoid a vector copy.

 glom/libglom/document/document.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index 0f2e851..5b2b970 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -1078,7 +1078,7 @@ void Document::change_relationship_name(const Glib::ustring& table_name, const G
   const auto doctableinfo = get_table_info(table_name);
   if(doctableinfo)
   {
-    const auto relationships = doctableinfo->m_relationships;
+    const auto& relationships = doctableinfo->m_relationships;
 
     //Change the relationship name:
     auto iterRelFind = find_if_same_name(relationships, name);


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