aboutsummaryrefslogtreecommitdiffhomepage
path: root/goto.h
diff options
context:
space:
mode:
Diffstat (limited to 'goto.h')
-rw-r--r--goto.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/goto.h b/goto.h
index 146bade..6275d34 100644
--- a/goto.h
+++ b/goto.h
@@ -53,8 +53,13 @@ class GotoTable : public RBTree {
}
};
+ /*
+ * whether to generate UndoTokens (unnecessary in macro invocations)
+ */
+ bool must_undo;
+
public:
- GotoTable() : RBTree() {}
+ GotoTable(bool _undo = true) : RBTree(), must_undo(_undo) {}
gint remove(gchar *name);
gint find(gchar *name);
@@ -63,7 +68,8 @@ public:
inline void
undo_set(gchar *name, gint pc = -1)
{
- undo.push(new UndoTokenSet(this, name, pc));
+ if (must_undo)
+ undo.push(new UndoTokenSet(this, name, pc));
}
#ifdef DEBUG