| 12 | // Given an array and an Object ID, iterate through the array until we find |
| 13 | // an ID that matches the ID we've passed in. |
| 14 | template <typename T, size_t N> int GetArraySlot(std::array<T, N> const& arr, GAME_OBJECT_ID objectID) |
| 15 | { |
| 16 | for (int i = 0; i < arr.size(); ++i) |
| 17 | { |
| 18 | if (objectID == arr[i].ObjectID) |
| 19 | return i; |
| 20 | } |
| 21 | |
| 22 | return NO_VALUE; |
| 23 | } |
no test coverage detected