From 773cf5ca08de0476b0b8b1ae4c25ac6da62a8059 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Fri, 7 Jul 2017 15:26:49 +0100 Subject: Add `-show-timings`; Clean up polymorphic procedure code a bit --- src/array.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/array.cpp') diff --git a/src/array.cpp b/src/array.cpp index 6670c7843..b382d3262 100644 --- a/src/array.cpp +++ b/src/array.cpp @@ -10,12 +10,12 @@ struct Array { isize capacity; T &operator[](isize index) { - GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds"); + GB_ASSERT_MSG(0 <= index && index < count, "Index %td is out of bounds ranges 0..<%td", index, count); return data[index]; } T const &operator[](isize index) const { - GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds"); + GB_ASSERT_MSG(0 <= index && index < count, "Index %td is out of bounds ranges 0..<%td", index, count); return data[index]; } }; @@ -31,7 +31,6 @@ template void array_reserve (Array *array, isize capacit template void array_resize (Array *array, isize count); template void array_set_capacity(Array *array, isize capacity); - template void array_init(Array *array, gbAllocator a, isize init_capacity) { array->allocator = a; -- cgit v1.2.3