diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-07 15:26:49 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-07 15:26:49 +0100 |
| commit | 773cf5ca08de0476b0b8b1ae4c25ac6da62a8059 (patch) | |
| tree | 203717ab20c5772f5b4ae720ed8f92df504f6340 /src/array.cpp | |
| parent | 2db03cb4a54eaa594ca0d3ccb6819a8d56e7efed (diff) | |
Add `-show-timings`; Clean up polymorphic procedure code a bit
Diffstat (limited to 'src/array.cpp')
| -rw-r--r-- | src/array.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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 <typename T> void array_reserve (Array<T> *array, isize capacit template <typename T> void array_resize (Array<T> *array, isize count); template <typename T> void array_set_capacity(Array<T> *array, isize capacity); - template <typename T> void array_init(Array<T> *array, gbAllocator a, isize init_capacity) { array->allocator = a; |