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-02-11 14:01:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-11 14:01:32 +0400
commitc1ca09b8c80a4fc063f7b804f68cd5c86db9f517 (patch)
tree4c9494572b31220e87f5d75696ec401efc51ad3a /source/blender/windowmanager
parent934fa91f75eaf5af46ed188dbf3ed50576acb81c (diff)
replace MEM_callocN with MEM_mallocN for events since their overwritten right after.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_api.h2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index e91d4f388af..a1437b70090 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -171,7 +171,7 @@ int WM_modal_tweak_exit(struct wmEvent *evt, int tweak_event);
void WM_event_add_notifier(const struct bContext *C, unsigned int type, void *reference);
void WM_main_add_notifier(unsigned int type, void *reference);
-void wm_event_add (struct wmWindow *win, struct wmEvent *event_to_add); /* XXX only for warning */
+void wm_event_add(struct wmWindow *win, const struct wmEvent *event_to_add);
/* at maximum, every timestep seconds it triggers event_type events */
struct wmTimer *WM_event_add_timer(struct wmWindowManager *wm, struct wmWindow *win, int event_type, double timestep);
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 0005c3a2230..3d510728684 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -91,9 +91,9 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA
/* ************ event management ************** */
-void wm_event_add(wmWindow *win, wmEvent *event_to_add)
+void wm_event_add(wmWindow *win, const wmEvent *event_to_add)
{
- wmEvent *event = MEM_callocN(sizeof(wmEvent), "wmEvent");
+ wmEvent *event = MEM_mallocN(sizeof(wmEvent), "wmEvent");
*event = *event_to_add;