From 169dff19d4da8d76e69b8e896aa25b0013639c03 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 2 Jan 2019 10:41:30 +0100 Subject: modernize loops --- src/knot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/knot.cpp') 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; } } -- cgit v1.2.3