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>2014-02-07 23:07:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-07 23:24:05 +0400
commitb3afbcab8ff2330c1473647be330a3ffe9b11885 (patch)
treee86b9c7d9676e63b8da92da79889dee13b8be186 /source/blender/imbuf
parent1c24d954f4ac63f22b703756b6664a4ad1b363d4 (diff)
ListBase API: add utility api funcs for clearing and checking empty
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/cache.c2
-rw-r--r--source/blender/imbuf/intern/colormanagement.c4
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/cache.c b/source/blender/imbuf/intern/cache.c
index 4be521218f1..0c17dd21434 100644
--- a/source/blender/imbuf/intern/cache.c
+++ b/source/blender/imbuf/intern/cache.c
@@ -375,7 +375,7 @@ static unsigned int *imb_thread_cache_get_tile(ImThreadTileCache *cache, ImBuf *
}
/* not found, have to do slow lookup in global cache */
- if (cache->unused.first == NULL) {
+ if (BLI_listbase_is_empty(&cache->unused)) {
ttile = cache->tiles.last;
replacetile = ttile->global;
BLI_remlink(&cache->tiles, ttile);
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index e5884f78b75..e8ffdc83240 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -583,7 +583,7 @@ static void colormanage_free_config(void)
colorspace = colorspace_next;
}
- global_colorspaces.first = global_colorspaces.last = NULL;
+ BLI_listbase_clear(&global_colorspaces);
global_tot_colorspace = 0;
/* free displays */
@@ -604,7 +604,7 @@ static void colormanage_free_config(void)
MEM_freeN(display);
display = display_next;
}
- global_displays.first = global_displays.last = NULL;
+ BLI_listbase_clear(&global_displays);
global_tot_display = 0;
/* free views */
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 6acd5154561..401070cd799 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -815,7 +815,7 @@ void IMB_exr_multilayer_convert(void *handle, void *base,
ExrLayer *lay;
ExrPass *pass;
- if (data->layers.first == NULL) {
+ if (BLI_listbase_is_empty(&data->layers)) {
printf("cannot convert multilayer, no layers in handle\n");
return;
}