[glom] Document::change_relationship_name(): Avoid a vector copy.



commit ebfe80f147a343d08a4c335fada806fb1a865d89
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 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index 0f2e8516..5b2b970a 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]