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-08-27 03:37:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-27 03:37:08 +0400
commit8ef934c73f3baeaa582efb8de906b27a3854979c (patch)
tree95dcb068fc96b3323e6ffe425ee6a7481b23eab4 /source/blender/blenloader
parentcdd57d499434061de35af23790c993220922b206 (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/blenloader')
-rw-r--r--source/blender/blenloader/intern/undofile.c6
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c5
2 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 2b63d13a9dd..12f4a295a34 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -51,9 +51,9 @@ void BLO_free_memfile(MemFile *memfile)
{
MemFileChunk *chunk;
- while ( (chunk = (memfile->chunks.first) ) ) {
- if (chunk->ident == 0) MEM_freeN(chunk->buf);
- BLI_remlink(&memfile->chunks, chunk);
+ while ((chunk = BLI_pophead(&memfile->chunks))) {
+ if (chunk->ident == 0)
+ MEM_freeN(chunk->buf);
MEM_freeN(chunk);
}
memfile->size = 0;
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 82040020ce4..dad132f45df 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -518,11 +518,8 @@ static void do_version_free_effects_245(ListBase *lb)
{
Effect *eff;
- eff = lb->first;
- while (eff) {
- BLI_remlink(lb, eff);
+ while ((eff = BLI_pophead(lb))) {
do_version_free_effect_245(eff);
- eff = lb->first;
}
}