aboutsummaryrefslogtreecommitdiff
path: root/src/array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/array.cpp')
-rw-r--r--src/array.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/array.cpp b/src/array.cpp
index d8b8e9ef3..2e8bf3400 100644
--- a/src/array.cpp
+++ b/src/array.cpp
@@ -8,16 +8,12 @@ struct Array {
isize capacity;
T &operator[](isize index) {
- if (count > 0) {
- GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds");
- }
+ GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds");
return data[index];
}
T const &operator[](isize index) const {
- if (count > 0) {
- GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds");
- }
+ GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds");
return data[index];
}
};