about summary refs log tree commit diff
path: root/src/base/tl/range.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/tl/range.h')
-rw-r--r--src/base/tl/range.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/base/tl/range.h b/src/base/tl/range.h
index f05169fa..1d225f49 100644
--- a/src/base/tl/range.h
+++ b/src/base/tl/range.h
@@ -150,11 +150,11 @@ public:
 	}
 
 	bool empty() const { return begin >= end; }
-	void pop_front() { assert(!empty()); begin++; }
-	void pop_back() { assert(!empty()); end--; }
-	T& front() { assert(!empty()); return *begin; }
-	T& back() { assert(!empty()); return *(end-1); }
-	T& index(unsigned i) { assert(i >= 0 && i < (unsigned)(end-begin)); return begin[i]; }
+	void pop_front() { tl_assert(!empty()); begin++; }
+	void pop_back() { tl_assert(!empty()); end--; }
+	T& front() { tl_assert(!empty()); return *begin; }
+	T& back() { tl_assert(!empty()); return *(end-1); }
+	T& index(unsigned i) { tl_assert(i < (unsigned)(end-begin)); return begin[i]; }
 	unsigned size() const { return (unsigned)(end-begin); }
 	plain_range slice(unsigned startindex, unsigned endindex)
 	{