aboutsummaryrefslogtreecommitdiff
path: root/src/array.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-10-09 11:46:14 +0100
committerGinger Bill <bill@gingerbill.org>2016-10-09 11:46:14 +0100
commit2e0b260d3aecb41f2168d6d0481d75897b5763f5 (patch)
treedfa63292aebf059b78af5476a3d10d725059a2ab /src/array.cpp
parente299c3693ee682a38db7141a73596b6a8f67cd1c (diff)
SSA - Basic block optimizations
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];
}
};