summaryrefslogtreecommitdiffstats
path: root/src/knot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/knot.cpp')
-rw-r--r--src/knot.cpp8
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;
}
}