From 2e0b260d3aecb41f2168d6d0481d75897b5763f5 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Sun, 9 Oct 2016 11:46:14 +0100 Subject: SSA - Basic block optimizations --- src/array.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/array.cpp') 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]; } }; -- cgit v1.2.3