diff options
Diffstat (limited to 'source/blender/blenlib/BLI_listbase_wrapper.hh')
-rw-r--r-- | source/blender/blenlib/BLI_listbase_wrapper.hh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_listbase_wrapper.hh b/source/blender/blenlib/BLI_listbase_wrapper.hh index 047099eb36e..00f757d4bc2 100644 --- a/source/blender/blenlib/BLI_listbase_wrapper.hh +++ b/source/blender/blenlib/BLI_listbase_wrapper.hh @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __BLI_LISTBASE_WRAPPER_HH__ -#define __BLI_LISTBASE_WRAPPER_HH__ +#pragma once /** \file * \ingroup bli @@ -96,9 +95,9 @@ template<typename T> class ListBaseWrapper { return (T *)ptr; } - uint index_of(const T *value) const + int64_t index_of(const T *value) const { - uint index = 0; + int64_t index = 0; for (T *ptr : *this) { if (ptr == value) { return index; @@ -106,10 +105,8 @@ template<typename T> class ListBaseWrapper { index++; } BLI_assert(false); - return 0; + return -1; } }; } /* namespace blender */ - -#endif /* __BLI_LISTBASE_WRAPPER_HH__ */ |