summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/connector-tool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/tools/connector-tool.cpp')
-rw-r--r--src/ui/tools/connector-tool.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/tools/connector-tool.cpp b/src/ui/tools/connector-tool.cpp
index 95b13f92c..5a1654e2f 100644
--- a/src/ui/tools/connector-tool.cpp
+++ b/src/ui/tools/connector-tool.cpp
@@ -190,11 +190,11 @@ ConnectorTool::~ConnectorTool()
{
this->sel_changed_connection.disconnect();
- for (int i = 0; i < 2; ++i) {
+ for (auto & i : this->endpt_handle) {
if (this->endpt_handle[1]) {
//g_object_unref(this->endpt_handle[i]);
- knot_unref(this->endpt_handle[i]);
- this->endpt_handle[i] = nullptr;
+ knot_unref(i);
+ i = nullptr;
}
}
@@ -313,8 +313,8 @@ static void cc_clear_active_knots(SPKnotList k)
{
// Hide the connection points if they exist.
if (k.size()) {
- for (SPKnotList::iterator it = k.begin(); it != k.end(); ++it) {
- it->first->hide();
+ for (auto & it : k) {
+ it.first->hide();
}
}
}
@@ -335,9 +335,9 @@ void ConnectorTool::cc_clear_active_conn()
}
// Hide the endpoint handles.
- for (int i = 0; i < 2; ++i) {
- if (this->endpt_handle[i]) {
- this->endpt_handle[i]->hide();
+ for (auto & i : this->endpt_handle) {
+ if (i) {
+ i->hide();
}
}
}