diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-27 03:37:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-27 03:37:08 +0400 |
commit | 8ef934c73f3baeaa582efb8de906b27a3854979c (patch) | |
tree | 95dcb068fc96b3323e6ffe425ee6a7481b23eab4 /source/blender/blenkernel/intern/image.c | |
parent | cdd57d499434061de35af23790c993220922b206 (diff) |
ghash/bli-listbase edits, rename BLI_ghash_pop -> BLI_ghash_popkey (since it takes a key as an arg and isnt popping any element from the hash as you might expect).
add BLI_pophead/tail, since getting the first element from a list and removing it is a common task.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 86382c64ed3..37dacd1a328 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -195,9 +195,7 @@ static void image_free_buffers(Image *ima) { ImBuf *ibuf; - while ((ibuf = ima->ibufs.first)) { - BLI_remlink(&ima->ibufs, ibuf); - + while ((ibuf = BLI_pophead(&ima->ibufs))) { if (ibuf->userdata) { MEM_freeN(ibuf->userdata); ibuf->userdata = NULL; @@ -524,8 +522,7 @@ void BKE_image_merge(Image *dest, Image *source) /* sanity check */ if (dest && source && dest != source) { - while ((ibuf = source->ibufs.first)) { - BLI_remlink(&source->ibufs, ibuf); + while ((ibuf = BLI_pophead(&source->ibufs))) { image_assign_ibuf(dest, ibuf, IMA_INDEX_PASS(ibuf->index), IMA_INDEX_FRAME(ibuf->index)); } |