From d07d857360339ba8a56c1f50e7d3b1647d4b883c Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 11 Nov 2012 06:31:03 +0100 Subject: DEBUG support for printing state change undo tokens --- undo.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/undo.h b/undo.h index 055fc3d..a32d02a 100644 --- a/undo.h +++ b/undo.h @@ -8,6 +8,10 @@ #include +#ifdef DEBUG +#include "parser.h" +#endif + class UndoToken { public: SLIST_ENTRY(UndoToken) tokens; @@ -43,6 +47,10 @@ public: void run(void) { +#ifdef DEBUG + if ((State **)ptr == &States::current) + g_printf("undo state -> %p\n", (void *)value); +#endif *ptr = value; } }; -- cgit v1.2.3