summaryrefslogtreecommitdiff
path: root/src/array.hpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2024-01-18 22:37:02 -0500
committerJonathan Bradley <jcb@pikum.xyz>2024-01-18 22:37:02 -0500
commit1b48d1382d2d57a822201f34743a51813798b348 (patch)
tree612672a4be654b38f3b44580f85e4f0637952512 /src/array.hpp
parent2e680ebd77236f7b62b9ded1b083c86f9e13b1c8 (diff)
camera checkpoint - large refactor for attempting to let physics own camera position
Diffstat (limited to 'src/array.hpp')
-rw-r--r--src/array.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/array.hpp b/src/array.hpp
index f8aa173..7db2252 100644
--- a/src/array.hpp
+++ b/src/array.hpp
@@ -61,11 +61,11 @@ inline void PkeArray_Add(PkeArray_Base *arrIn, const D &val, MemBucket *bkt = nu
}
}
-template<typename D, typename F = bool(const D&)>
-inline uint32_t PkeArray_FindFirstIndex(PkeArray_Base *arrIn, F fn) {
+template<typename D, typename D2, typename F = bool(const D&, const D2&)>
+inline int64_t PkeArray_FindFirstIndex(PkeArray_Base *arrIn, F fn, const D2 &d2) {
auto *arr = static_cast<PkeArray<D> *>(arrIn);
- for (uint32_t i = 0; i < arr->next; ++i) {
- if (fn(arr->data[i])) {
+ for (int64_t i = 0; i < arr->next; ++i) {
+ if (fn(arr->data[i], d2)) {
return i;
}
}