diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 09:27:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 09:27:31 +0400 |
commit | 170716ca533b250ffa9ae031096bbef9ad7c2976 (patch) | |
tree | 3c20404f22073aab79dc6ff5e9e08cd2f841d951 /source/blender/editors/space_text | |
parent | 984d2e42e4a81c1f92dc405ce1b265842bc94b9a (diff) |
use BKE_area_find_region_type in place of inline loops (no functional changes).
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_header.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index bfc600c774a..165cec238c0 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -55,6 +55,7 @@ #include "BLI_utildefines.h" #include "BKE_context.h" +#include "BKE_screen.h" #include "ED_screen.h" @@ -78,16 +79,13 @@ static ARegion *text_has_properties_region(ScrArea *sa) { ARegion *ar, *arnew; - - for(ar= sa->regionbase.first; ar; ar= ar->next) - if(ar->regiontype==RGN_TYPE_UI) - return ar; + + ar= BKE_area_find_region_type(sa, RGN_TYPE_UI); + if(ar) return ar; /* add subdiv level; after header */ - for(ar= sa->regionbase.first; ar; ar= ar->next) - if(ar->regiontype==RGN_TYPE_HEADER) - break; - + ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + /* is error! */ if(ar==NULL) return NULL; |