[glom] AddDel::construct_specified_columns(): Really zero the items.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] AddDel::construct_specified_columns(): Really zero the items.
- Date: Tue, 2 Dec 2014 21:02:27 +0000 (UTC)
commit 1c03b4ba725358ee168defc100cb33f09f5298ac
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Dec 2 22:00:37 2014 +0100
AddDel::construct_specified_columns(): Really zero the items.
The = 0 was inside the switch() instead of after it.
Found by Coverity Scan.
glom/utility_widgets/adddel/adddel.cc | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index 476cd3b..7eab78d 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -701,13 +701,13 @@ void AddDel::construct_specified_columns()
model_column_index = 0;
for(type_vecModelColumns::iterator iter = vecModelColumns.begin(); iter != vecModelColumns.end(); ++iter)
{
- Gtk::TreeModelColumnBase* pModelColumn = *iter;
+ Gtk::TreeModelColumnBase* pModelColumn = *iter;
- if(model_column_index < (int)m_ColumnTypes.size())
- {
- AddDelColumnInfo::enumStyles style = m_ColumnTypes[model_column_index].m_style;
- switch(style)
- {
+ if(model_column_index < (int)m_ColumnTypes.size())
+ {
+ AddDelColumnInfo::enumStyles style = m_ColumnTypes[model_column_index].m_style;
+ switch(style)
+ {
//Cast it to the derived type, so we can delete it properly.
//This is necessary because TreeModelColumnBase's destructor is not virtual.
case(AddDelColumnInfo::STYLE_Boolean):
@@ -728,9 +728,9 @@ void AddDel::construct_specified_columns()
delete pModelColumnDerived;
break;
}
-
- *iter = 0;
}
+
+ *iter = 0;
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]