[glom] Some use of auto to avoid signed/unsigned mismatches.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Some use of auto to avoid signed/unsigned mismatches.
- Date: Tue, 29 Mar 2016 17:40:01 +0000 (UTC)
commit 9b611bdeb39290fd7ee1e6ea3a7a72253a7d4c29
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Mar 29 17:38:33 2016 +0200
Some use of auto to avoid signed/unsigned mismatches.
glom/libglom/sql_utils.cc | 4 ++--
glom/mode_data/db_adddel/db_adddel.cc | 2 +-
glom/utility_widgets/adddel/adddel.cc | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glom/libglom/sql_utils.cc b/glom/libglom/sql_utils.cc
index 013c26e..a6e3656 100644
--- a/glom/libglom/sql_utils.cc
+++ b/glom/libglom/sql_utils.cc
@@ -268,7 +268,7 @@ Glib::RefPtr<Gnome::Gda::SqlBuilder> build_sql_select_with_where_clause(const Gl
//Add the WHERE clause:
if(!where_clause.empty())
{
- const int id = builder->import_expression(where_clause);
+ const auto id = builder->import_expression(where_clause);
builder->set_where(id);
}
@@ -553,7 +553,7 @@ Glib::RefPtr<Gnome::Gda::SqlBuilder> build_sql_update_with_where_clause(
//Add the WHERE clause:
if(!where_clause.empty())
{
- const int id = builder->import_expression(where_clause);
+ const auto id = builder->import_expression(where_clause);
builder->set_where(id);
}
}
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index 1a32654..42e9d42 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -1669,7 +1669,7 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
//But we must call set_fixed_width() later or we will have a zero-width column.
pViewColumn->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED);
- guint cols_count = m_TreeView.append_column(*pViewColumn);
+ auto cols_count = m_TreeView.append_column(*pViewColumn);
auto layout_item = m_column_items[model_column_index];
auto layout_item_field = std::dynamic_pointer_cast<const LayoutItem_Field>(layout_item);
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index eb792f4..d53e9a9 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -1302,7 +1302,7 @@ guint AddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRender
{
auto pViewColumn = Gtk::manage( new TreeViewColumnGlom(title, cellrenderer) );
pViewColumn->set_renderer(cellrenderer, model_column); //render it via the default "text" property.
- guint cols_count = m_TreeView.append_column(*pViewColumn);
+ auto cols_count = m_TreeView.append_column(*pViewColumn);
//Allow the column to be reordered by dragging and dropping the column header:
pViewColumn->set_reorderable();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]