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/knot.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/knot.cpp')
| -rw-r--r-- | src/knot.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/knot.cpp b/src/knot.cpp index caec9c829..dcf654b2d 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -159,10 +159,10 @@ SPKnot::~SPKnot() { this->item = nullptr; } - for (gint i = 0; i < SP_KNOT_VISIBLE_STATES; i++) { - if (this->cursor[i]) { - g_object_unref(this->cursor[i]); - this->cursor[i] = nullptr; + for (auto & i : this->cursor) { + if (i) { + g_object_unref(i); + i = nullptr; } } |
