lib: QueueModel stamp cleanups
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
e9e1e4fad8
commit
4078f9a893
|
@ -11,18 +11,14 @@
|
||||||
|
|
||||||
QueueModel::QueueModel(Queue *q)
|
QueueModel::QueueModel(Queue *q)
|
||||||
: Glib::ObjectBase( typeid(QueueModel) ),
|
: Glib::ObjectBase( typeid(QueueModel) ),
|
||||||
Glib::Object(), queue(q)
|
Glib::Object(), stamp(1), queue(q)
|
||||||
{
|
{
|
||||||
do {
|
|
||||||
stamp = rand();
|
|
||||||
} while (stamp == 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueueModel::increment_stamp()
|
void QueueModel::increment_stamp()
|
||||||
{
|
{
|
||||||
do {
|
if (++stamp == 0)
|
||||||
stamp++;
|
++stamp;
|
||||||
} while (stamp == 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QueueModel::check_iter_validity(const Gtk::TreeIter &iter) const
|
bool QueueModel::check_iter_validity(const Gtk::TreeIter &iter) const
|
||||||
|
|
Loading…
Reference in New Issue