util/ConstBuffer: wrap assert() in NDEBUG check
Fixes build failure because assert.h was not included.
This commit is contained in:
parent
7213c26798
commit
74a46788cd
@ -208,7 +208,9 @@ struct ConstBuffer {
|
|||||||
* not actually modify the buffer). Buffer must not be empty.
|
* not actually modify the buffer). Buffer must not be empty.
|
||||||
*/
|
*/
|
||||||
void pop_front() {
|
void pop_front() {
|
||||||
|
#ifndef NDEBUG
|
||||||
assert(!IsEmpty());
|
assert(!IsEmpty());
|
||||||
|
#endif
|
||||||
|
|
||||||
++data;
|
++data;
|
||||||
--size;
|
--size;
|
||||||
@ -219,7 +221,9 @@ struct ConstBuffer {
|
|||||||
* not actually modify the buffer). Buffer must not be empty.
|
* not actually modify the buffer). Buffer must not be empty.
|
||||||
*/
|
*/
|
||||||
void pop_back() {
|
void pop_back() {
|
||||||
|
#ifndef NDEBUG
|
||||||
assert(!IsEmpty());
|
assert(!IsEmpty());
|
||||||
|
#endif
|
||||||
|
|
||||||
--size;
|
--size;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user