Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-09-11 11:36:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-11 11:36:40 +0400
commit17d749eaad35a29155c13ab986651c0fc1926ba6 (patch)
tree88093992c98ca86d6feeeec97fa52a301dc570b7 /source/blender/makesrna/intern/rna_text.c
parent801b8430a29a2c3a7fd2bd460414b8bb071ea617 (diff)
replace inline index lookup with BLI_findindex
Diffstat (limited to 'source/blender/makesrna/intern/rna_text.c')
-rw-r--r--source/blender/makesrna/intern/rna_text.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index 3ba6550c400..24695928679 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -84,14 +84,7 @@ static int rna_Text_modified_get(PointerRNA *ptr)
static int rna_Text_current_line_index_get(PointerRNA *ptr)
{
Text *text = (Text *)ptr->data;
- TextLine *linep = text->lines.first;
- int i = 0;
- while(linep) {
- if(text->curl==linep) break;
- linep = linep->next;
- i++;
- }
- return i;
+ return BLI_findindex(&text->lines, text->curl);
}
static void rna_TextLine_body_get(PointerRNA *ptr, char *value)