parent
edec4708b5
commit
1633d9af9b
|
|
@ -61,15 +61,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @returns number of elements in the buffer
|
/// @returns number of elements in the buffer
|
||||||
/// @@TODO better solution if it exists
|
|
||||||
inline index_t count() const {
|
inline index_t count() const {
|
||||||
index_t i = tail;
|
return head - tail;
|
||||||
index_t c = 0;
|
|
||||||
while (i != head) {
|
|
||||||
i = next(i);
|
|
||||||
++c;
|
|
||||||
}
|
|
||||||
return c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue