mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Replace usages of tl_assert with dbg_assert
This commit is contained in:
parent
8a65e8386b
commit
535fbd28fa
|
@ -186,27 +186,27 @@ public:
|
|||
bool empty() const { return begin >= end; }
|
||||
void pop_front()
|
||||
{
|
||||
tl_assert(!empty());
|
||||
dbg_assert(!empty(), "empty");
|
||||
begin++;
|
||||
}
|
||||
void pop_back()
|
||||
{
|
||||
tl_assert(!empty());
|
||||
dbg_assert(!empty(), "empty");
|
||||
end--;
|
||||
}
|
||||
T &front()
|
||||
{
|
||||
tl_assert(!empty());
|
||||
dbg_assert(!empty(), "empty");
|
||||
return *begin;
|
||||
}
|
||||
T &back()
|
||||
{
|
||||
tl_assert(!empty());
|
||||
dbg_assert(!empty(), "empty");
|
||||
return *(end - 1);
|
||||
}
|
||||
T &index(unsigned i)
|
||||
{
|
||||
tl_assert(i < (unsigned)(end - begin));
|
||||
dbg_assert(i < (unsigned)(end - begin), "out of range");
|
||||
return begin[i];
|
||||
}
|
||||
unsigned size() const { return (unsigned)(end - begin); }
|
||||
|
|
Loading…
Reference in a new issue