projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a28c302
)
Enum: Use an iterator instead of iterating by indexes
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Wed, 12 Mar 2014 20:34:37 +0000
(21:34 +0100)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Thu, 13 Mar 2014 17:00:33 +0000
(17:00 +0000)
pv/prop/enum.cpp
patch
|
blob
|
history
diff --git
a/pv/prop/enum.cpp
b/pv/prop/enum.cpp
index 9044c6bae9d3c6335589c26e7be65835186a7b81..71cd431548da771ff5e3a9289480f62c5d5b71d2 100644
(file)
--- a/
pv/prop/enum.cpp
+++ b/
pv/prop/enum.cpp
@@
-41,8
+41,9
@@
Enum::Enum(QString name,
Enum::~Enum()
{
- for (unsigned int i = 0; i < _values.size(); i++)
- g_variant_unref(_values[i].first);
+ for (vector< pair<GVariant*, QString> >::const_iterator i =
+ _values.begin(); i != _values.end(); i++)
+ g_variant_unref((*i).first);
}
QWidget* Enum::get_widget(QWidget *parent, bool auto_commit)