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/windowmanager/intern/wm.c
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/windowmanager/intern/wm.c')
-rw-r--r--source/blender/windowmanager/intern/wm.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index a109c2cbd7b..74c066d1d86 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -156,8 +156,7 @@ void WM_operator_stack_clear(wmWindowManager *wm)
{
wmOperator *op;
- while ((op = wm->operators.first)) {
- BLI_remlink(&wm->operators, op);
+ while ((op = BLI_pophead(&wm->operators))) {
WM_operator_free(op);
}
@@ -414,20 +413,17 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
if (wm->autosavetimer)
wm_autosave_timer_ended(wm);
- while ((win = wm->windows.first)) {
- BLI_remlink(&wm->windows, win);
+ while ((win = BLI_pophead(&wm->windows))) {
win->screen = NULL; /* prevent draw clear to use screen */
wm_draw_window_clear(win);
wm_window_free(C, wm, win);
}
- while ((op = wm->operators.first)) {
- BLI_remlink(&wm->operators, op);
+ while ((op = BLI_pophead(&wm->operators))) {
WM_operator_free(op);
}
- while ((keyconf = wm->keyconfigs.first)) {
- BLI_remlink(&wm->keyconfigs, keyconf);
+ while ((keyconf = BLI_pophead(&wm->keyconfigs))) {
WM_keyconfig_free(keyconf);
}