[Bf-blender-cvs] [8213949] master: Remove "debug build only" event printing.

Bastien Montagne noreply at git.blender.org
Fri Jul 29 15:46:10 CEST 2016


Commit: 821394937f3da8e3275551e4b1263bb2d84d9471
Author: Bastien Montagne
Date:   Fri Jul 29 14:45:15 2016 +0200
Branches: master
https://developer.blender.org/rB821394937f3da8e3275551e4b1263bb2d84d9471

Remove "debug build only" event printing.

This makes no sense since user usually only has release build... And those noisy printings are
behind debug flag anyway, so really no reason to only print them out in debug build.

===================================================================

M	source/blender/windowmanager/WM_api.h
M	source/blender/windowmanager/intern/wm_event_system.c

===================================================================

diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 26a1c70..493fe82 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -387,9 +387,7 @@ void		WM_gestures_remove(struct bContext *C);
 			/* fileselecting support */
 void		WM_event_add_fileselect(struct bContext *C, struct wmOperator *op);
 void		WM_event_fileselect_event(struct wmWindowManager *wm, void *ophandle, int eventval);
-#ifndef NDEBUG
 void		WM_event_print(const struct wmEvent *event);
-#endif
 
 void		WM_operator_region_active_win_set(struct bContext *C);
 
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 4515ae9..01dc771 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -81,9 +81,7 @@
 #include "wm_event_system.h"
 #include "wm_event_types.h"
 
-#ifndef NDEBUG
-#  include "RNA_enum_types.h"
-#endif
+#include "RNA_enum_types.h"
 
 static void wm_notifier_clear(wmNotifier *note);
 static void update_tablet_data(wmWindow *win, wmEvent *event);
@@ -550,8 +548,6 @@ void WM_operator_region_active_win_set(bContext *C)
 }
 
 /* for debugging only, getting inspecting events manually is tedious */
-#ifndef NDEBUG
-
 void WM_event_print(const wmEvent *event)
 {
 	if (event) {
@@ -593,8 +589,6 @@ void WM_event_print(const wmEvent *event)
 	}
 }
 
-#endif /* NDEBUG */
-
 /**
  * Show the report in the info header.
  */
@@ -1969,15 +1963,11 @@ static int wm_action_not_handled(int action)
 
 static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers)
 {
-#ifndef NDEBUG
 	const bool do_debug_handler = (G.debug & G_DEBUG_HANDLERS) &&
 	        /* comment this out to flood the console! (if you really want to test) */
 	        !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)
 	        ;
-#    define PRINT if (do_debug_handler) printf
-#else
-#  define PRINT(format, ...)
-#endif
+# define PRINT if (do_debug_handler) printf
 
 	wmWindowManager *wm = CTX_wm_manager(C);
 	wmEventHandler *handler, *nexthandler;
@@ -2382,20 +2372,16 @@ void wm_event_do_handlers(bContext *C)
 		while ( (event = win->queue.first) ) {
 			int action = WM_HANDLER_CONTINUE;
 
-#ifndef NDEBUG
 			if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS) && !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) {
 				printf("\n%s: Handling event\n", __func__);
 				WM_event_print(event);
 			}
-#endif
 
 			/* take care of pie event filter */
 			if (wm_event_pie_filter(win, event)) {
-#ifndef NDEBUG
 				if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS) && !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) {
 					printf("\n%s: event filtered due to pie button pressed\n", __func__);
 				}
-#endif
 				BLI_remlink(&win->queue, event);
 				wm_event_free(event);
 				continue;




More information about the Bf-blender-cvs mailing list