[glom] DbAddDel::select_item(): Set the correct variable.



commit 0741af8651b7e456de98904073b3510c31cc5e7f
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Jul 5 21:42:53 2015 +0200

    DbAddDel::select_item(): Set the correct variable.
    
    This regression was introduced when converting to range-based for loops.
    Hopefully it, and others, can be prevented by using the -Wshadow g++
    warning.

 glom/mode_data/db_adddel/db_adddel.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index 310bc49..2dcbfd9 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -421,8 +421,9 @@ bool DbAddDel::select_item(const Gtk::TreeModel::iterator& iter, bool start_edit
 {
   //Find the first column with a layout_item:
   std::shared_ptr<const LayoutItem> layout_item;
-  for(const auto& layout_item : m_column_items)
+  for(const auto& item : m_column_items)
   {
+    layout_item = item;
     if(layout_item)
       break;
   }


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