lib: QueueModel stamp cleanups

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-01-13 20:27:49 -05:00
parent e9e1e4fad8
commit 4078f9a893
1 changed files with 3 additions and 7 deletions

View File

@ -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