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>2018-09-19 05:05:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-19 05:12:21 +0300
commitbb3ec3ebafbc2c0e5d8530148a433242e0adad30 (patch)
treed30aaa3df2d03f90f6e7749bdc075445a5642045 /source/blender/windowmanager/intern
parent4c918efd44be11d47afc1efed684a15ad5579722 (diff)
BLI_utildefines: rename pointer conversion macros
Terms get/set don't make much sense when casting values. Name macros so the conversion is obvious, use common prefix for easier completion. - GET_INT_FROM_POINTER -> POINTER_AS_INT - SET_INT_IN_POINTER -> POINTER_FROM_INT - GET_UINT_FROM_POINTER -> POINTER_AS_UINT - SET_UINT_IN_POINTER -> POINTER_FROM_UINT
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c4
-rw-r--r--source/blender/windowmanager/intern/wm_window.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 72973d3de56..2a0a80fa83c 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -361,7 +361,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
}
if (!BLI_ghash_haskey(libraries, libname)) {
- BLI_ghash_insert(libraries, BLI_strdup(libname), SET_INT_IN_POINTER(lib_idx));
+ BLI_ghash_insert(libraries, BLI_strdup(libname), POINTER_FROM_INT(lib_idx));
lib_idx++;
wm_link_append_data_library_add(lapp_data, libname);
}
@@ -382,7 +382,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
continue;
}
- lib_idx = GET_INT_FROM_POINTER(BLI_ghash_lookup(libraries, libname));
+ lib_idx = POINTER_AS_INT(BLI_ghash_lookup(libraries, libname));
item = wm_link_append_data_item_add(lapp_data, name, BKE_idcode_from_name(group), NULL);
BLI_BITMAP_ENABLE(item->libraries, lib_idx);
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 501d448011b..40aff4fd8e3 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1468,7 +1468,7 @@ static int wm_window_timer(const bContext *C)
else if (wt->event_type == TIMERAUTOSAVE)
wm_autosave_timer(C, wm, wt);
else if (wt->event_type == TIMERNOTIFIER)
- WM_main_add_notifier(GET_UINT_FROM_POINTER(wt->customdata), NULL);
+ WM_main_add_notifier(POINTER_AS_UINT(wt->customdata), NULL);
else if (win) {
wmEvent event;
wm_event_init_from_window(win, &event);
@@ -1598,7 +1598,7 @@ wmTimer *WM_event_add_timer_notifier(wmWindowManager *wm, wmWindow *win, unsigne
wt->stime = wt->ltime;
wt->timestep = timestep;
wt->win = win;
- wt->customdata = SET_UINT_IN_POINTER(type);
+ wt->customdata = POINTER_FROM_UINT(type);
wt->flags |= WM_TIMER_NO_FREE_CUSTOM_DATA;
BLI_addtail(&wm->timers, wt);