From 4078f9a8933158a059d9d3afbb1ddcfbeeb4576b Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Tue, 13 Jan 2015 20:27:49 -0500 Subject: [PATCH] lib: QueueModel stamp cleanups Signed-off-by: Anna Schumaker --- lib/model.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/model.cpp b/lib/model.cpp index 8381b268..cd4abeae 100644 --- a/lib/model.cpp +++ b/lib/model.cpp @@ -11,18 +11,14 @@ QueueModel::QueueModel(Queue *q) : Glib::ObjectBase( typeid(QueueModel) ), - Glib::Object(), queue(q) + Glib::Object(), stamp(1), queue(q) { - do { - stamp = rand(); - } while (stamp == 0); } void QueueModel::increment_stamp() { - do { - stamp++; - } while (stamp == 0); + if (++stamp == 0) + ++stamp; } bool QueueModel::check_iter_validity(const Gtk::TreeIter &iter) const