From 9dd2447d42fd6c822139f3cd1fd2cd284346e5e8 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 1 Feb 2013 19:34:23 +0100 Subject: fixed buffer Ring initialization * there was a dependency on interface initialization. it did not cause issues because destruction order was by chance. * introduced INIT_PRIO and PRIO_* macros to easy initialization order declaration (using a PRIO_* formula makes code self-documenting) * also used this to clean up QRegisterTable initialization (we do not need the explicit initialize() method) * also used to clean up symbols initialization --- src/qregisters.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/qregisters.cpp') diff --git a/src/qregisters.cpp b/src/qregisters.cpp index eda915b..a13fba1 100644 --- a/src/qregisters.cpp +++ b/src/qregisters.cpp @@ -52,7 +52,7 @@ namespace States { } namespace QRegisters { - QRegisterTable globals; + QRegisterTable globals INIT_PRIO(PRIO_INTERFACE+1); QRegisterTable *locals = NULL; QRegister *current = NULL; @@ -248,8 +248,7 @@ QRegisterBufferInfo::edit(void) undo.push_msg(SCI_UNDO); } -void -QRegisterTable::initialize(void) +QRegisterTable::QRegisterTable(bool _undo) : RBTree(), must_undo(_undo) { /* general purpose registers */ for (gchar q = 'A'; q <= 'Z'; q++) -- cgit v1.2.3