diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-10-09 11:46:14 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-10-09 11:46:14 +0100 |
| commit | 2e0b260d3aecb41f2168d6d0481d75897b5763f5 (patch) | |
| tree | dfa63292aebf059b78af5476a3d10d725059a2ab /src/array.cpp | |
| parent | e299c3693ee682a38db7141a73596b6a8f67cd1c (diff) | |
SSA - Basic block optimizations
Diffstat (limited to 'src/array.cpp')
| -rw-r--r-- | src/array.cpp | 8 |
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]; } }; |