From 535fbd28fa657fae22715fd59d44e03b424c584a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sun, 15 May 2022 18:55:43 +0200 Subject: [PATCH] Replace usages of tl_assert with dbg_assert --- src/base/tl/range.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/base/tl/range.h b/src/base/tl/range.h index fc63530f9..b3211771a 100644 --- a/src/base/tl/range.h +++ b/src/base/tl/range.h @@ -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); }