From b64e36d26dac8463c0f4a1dc1dbd9cf1ef27e0d9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 30 Jul 2014 15:01:16 +1000 Subject: BLI_listbase: consistent name prefix --- source/blender/blenlib/intern/listbase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib/intern/listbase.c') diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c index b0c24899bd1..9c5f2ad7542 100644 --- a/source/blender/blenlib/intern/listbase.c +++ b/source/blender/blenlib/intern/listbase.c @@ -599,7 +599,7 @@ void BLI_listbase_reverse(ListBase *lb) /** * \param vlink Link to make first. */ -void BLI_rotatelist_first(ListBase *lb, void *vlink) +void BLI_listbase_rotate_first(ListBase *lb, void *vlink) { /* make circular */ ((Link *)lb->first)->prev = lb->last; @@ -615,7 +615,7 @@ void BLI_rotatelist_first(ListBase *lb, void *vlink) /** * \param vlink Link to make last. */ -void BLI_rotatelist_last(ListBase *lb, void *vlink) +void BLI_listbase_rotate_last(ListBase *lb, void *vlink) { /* make circular */ ((Link *)lb->first)->prev = lb->last; -- cgit v1.2.3 From 1c8ac33970f6e200f236914443d1f0ea3b2a8e0c Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 5 Aug 2014 10:33:24 -0400 Subject: Fix incorrect comments in listbase, add unit test to verify change Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D708 --- source/blender/blenlib/intern/listbase.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenlib/intern/listbase.c') diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c index 9c5f2ad7542..abf15d57cf7 100644 --- a/source/blender/blenlib/intern/listbase.c +++ b/source/blender/blenlib/intern/listbase.c @@ -354,7 +354,7 @@ int BLI_countlist(const ListBase *listbase) } /** - * Returns the nth element of \a listbase, numbering from 1. + * Returns the nth element of \a listbase, numbering from 0. */ void *BLI_findlink(const ListBase *listbase, int number) { @@ -372,7 +372,7 @@ void *BLI_findlink(const ListBase *listbase, int number) } /** - * Returns the nth-last element of \a listbase, numbering from 1. + * Returns the nth-last element of \a listbase, numbering from 0. */ void *BLI_rfindlink(const ListBase *listbase, int number) { @@ -390,7 +390,7 @@ void *BLI_rfindlink(const ListBase *listbase, int number) } /** - * Returns the position of \a vlink within \a listbase, numbering from 1, or -1 if not found. + * Returns the position of \a vlink within \a listbase, numbering from 0, or -1 if not found. */ int BLI_findindex(const ListBase *listbase, const void *vlink) { -- cgit v1.2.3