diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-08 08:39:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-08 08:39:09 +0400 |
commit | fcf137dbd7f31a22657a9fb5c460ee599bff4853 (patch) | |
tree | beb4ba3e6548561ca7aad67e19acc5a0e75c3413 /source/blender/blenlib/intern/listbase.c | |
parent | 45669ebbc6fab86e1576378b75298116009a2318 (diff) |
style cleanup
Diffstat (limited to 'source/blender/blenlib/intern/listbase.c')
-rw-r--r-- | source/blender/blenlib/intern/listbase.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c index 348efaf40a9..00b2d3bee74 100644 --- a/source/blender/blenlib/intern/listbase.c +++ b/source/blender/blenlib/intern/listbase.c @@ -472,9 +472,11 @@ void *BLI_rfindstring_ptr(const ListBase *listbase, const char *id, const int of return NULL; } +/** + * Finds the first element of listbase which contains the specified pointer value + * at the specified offset, returning NULL if not found. + */ void *BLI_findptr(const ListBase *listbase, const void *ptr, const int offset) -/* finds the first element of listbase which contains the specified pointer value -at the specified offset, returning NULL if not found. */ { Link *link = NULL; const void *ptr_iter; @@ -493,9 +495,11 @@ at the specified offset, returning NULL if not found. */ return NULL; } /* same as above but find reverse */ +/** + * Finds the last element of listbase which contains the specified pointer value + * at the specified offset, returning NULL if not found. + */ void *BLI_rfindptr(const ListBase *listbase, const void *ptr, const int offset) -/* finds the last element of listbase which contains the specified pointer value -at the specified offset, returning NULL if not found. */ { Link *link = NULL; const void *ptr_iter; @@ -514,9 +518,11 @@ at the specified offset, returning NULL if not found. */ return NULL; } +/** + * Returns the 1-based index of the first element of listbase which contains the specified + * null-terminated string at the specified offset, or -1 if not found. + */ int BLI_findstringindex(const ListBase *listbase, const char *id, const int offset) -/* returns the 1-based index of the first element of listbase which contains the specified -null-terminated string at the specified offset, or -1 if not found. */ { Link *link = NULL; const char *id_iter; |