[glom] C++11: More use of auto.



commit 9f593df90990a491c32925426aa46e9aaff69ce8
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Feb 9 09:30:17 2016 +0100

    C++11: More use of auto.

 glom/mode_data/datawidget/combo.cc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glom/mode_data/datawidget/combo.cc b/glom/mode_data/datawidget/combo.cc
index b94aa4e..bfcb058 100644
--- a/glom/mode_data/datawidget/combo.cc
+++ b/glom/mode_data/datawidget/combo.cc
@@ -69,7 +69,7 @@ void ComboGlom::on_fixed_cell_data(const Gtk::TreeModel::iterator& iter, Gtk::Ce
   if(!iter)
     return;
 
-  const std::shared_ptr<const LayoutItem>& layout_item = get_layout_item();
+  const auto layout_item = get_layout_item();
   const auto field = std::dynamic_pointer_cast<const LayoutItem_Field>(layout_item);
   if(!field)
     return;
@@ -116,7 +116,7 @@ void ComboGlom::set_choices_fixed(const Formatting::type_list_values& list_value
   if(columns_count)
     columns_count -= 1; //The last one is the just the extra text-equivalent of the first one, for 
GtkComboBox with has-entry=true, or for translations.
 
-  const std::shared_ptr<const LayoutItem>& layout_item = get_layout_item();
+  const auto layout_item = get_layout_item();
   const auto field = std::dynamic_pointer_cast<const LayoutItem_Field>(layout_item);
 
   //For fixed (custom) choices, this will always be 1 column anyway,
@@ -228,7 +228,7 @@ void ComboGlom::check_for_change()
 
 void ComboGlom::set_value(const Gnome::Gda::Value& value)
 {
-  auto layout_item = std::dynamic_pointer_cast<const LayoutItem_Field>(get_layout_item());
+  const auto layout_item = std::dynamic_pointer_cast<const LayoutItem_Field>(get_layout_item());
   if(!layout_item)
     return;
 


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