[glom/glom-1-30] Document::change_relationship_name(): Avoid a vector copy.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-30] Document::change_relationship_name(): Avoid a vector copy.
- Date: Tue, 20 Jun 2017 19:14:08 +0000 (UTC)
commit 7a2f0f0551de134d8d931fd477a138b297b24636
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 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index 841b22d..7b2df36 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -1085,8 +1085,8 @@ void Document::change_relationship_name(const Glib::ustring& table_name, const G
const auto doctableinfo = get_table_info(table_name);
if(doctableinfo)
{
- type_vec_relationships relationships = doctableinfo->m_relationships;
-
+ const auto& relationships = doctableinfo->m_relationships;
+
//Change the relationship name:
auto iterRelFind = find_if_same_name(relationships, name);
if(iterRelFind != relationships.end())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]