diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
| commit | 169dff19d4da8d76e69b8e896aa25b0013639c03 (patch) | |
| tree | a0c070fa95188b5cde708ac285e6a2db9df4a83f /src/ui/tools/connector-tool.cpp | |
| parent | Avoid creating a new document before opening an old document. (diff) | |
| download | inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip | |
modernize loops
Diffstat (limited to 'src/ui/tools/connector-tool.cpp')
| -rw-r--r-- | src/ui/tools/connector-tool.cpp | 16 |
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(); } } } |
