Skip to content

Commit 17a9127

Browse files
committed
FIELD_T is assumed to be a pointer here, so mark it as such
1 parent 4b2a2d7 commit 17a9127

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

code/globalincs/utility.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ typename T::size_type stringcost(const T& op, const T& input, typename T::size_t
162162
}
163163

164164
template <typename VECTOR_T, typename ITEM_T, typename FIELD_T>
165-
int count_items_with_string(const VECTOR_T& item_vector, FIELD_T ITEM_T::* field, const char* str)
165+
int count_items_with_string(const VECTOR_T& item_vector, FIELD_T* ITEM_T::* field, const char* str)
166166
{
167167
int count = 0;
168168
for (const ITEM_T& item : item_vector)
@@ -231,7 +231,7 @@ int count_items_with_field(const VECTOR_T& item_vector, FIELD_T ITEM_T::* field,
231231
}
232232

233233
template <typename ITEM_T, typename FIELD_T>
234-
int count_items_with_string(const ITEM_T* item_array, int num_items, FIELD_T ITEM_T::* field, const char* str)
234+
int count_items_with_string(const ITEM_T* item_array, int num_items, FIELD_T* ITEM_T::* field, const char* str)
235235
{
236236
if (item_array == nullptr)
237237
return 0;
@@ -308,7 +308,7 @@ int count_items_with_field(const ITEM_T* item_array, int num_items, FIELD_T ITEM
308308
}
309309

310310
template <typename VECTOR_T, typename ITEM_T, typename FIELD_T>
311-
int find_item_with_string(const VECTOR_T& item_vector, FIELD_T ITEM_T::* field, const char* str)
311+
int find_item_with_string(const VECTOR_T& item_vector, FIELD_T* ITEM_T::* field, const char* str)
312312
{
313313
int index = 0;
314314
for (const ITEM_T& item : item_vector)
@@ -385,7 +385,7 @@ int find_item_with_field(const VECTOR_T& item_vector, FIELD_T ITEM_T::* field, c
385385
}
386386

387387
template <typename ITEM_T, typename FIELD_T>
388-
int find_item_with_string(const ITEM_T* item_array, int num_items, FIELD_T ITEM_T::* field, const char* str)
388+
int find_item_with_string(const ITEM_T* item_array, int num_items, FIELD_T* ITEM_T::* field, const char* str)
389389
{
390390
if (item_array == nullptr)
391391
return -1;

0 commit comments

Comments
 (0)