diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-01 19:34:23 +0100 |
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-01 19:34:23 +0100 |
| commit | 9dd2447d42fd6c822139f3cd1fd2cd284346e5e8 (patch) | |
| tree | 96f00124bc521f631567a619686da012bb199127 /src/qregisters.h | |
| parent | 850206158f6e77a4798f79fe293a7d7b7a7687f0 (diff) | |
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
Diffstat (limited to 'src/qregisters.h')
| -rw-r--r-- | src/qregisters.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qregisters.h b/src/qregisters.h index 34f20e8..19fd3cd 100644 --- a/src/qregisters.h +++ b/src/qregisters.h @@ -156,7 +156,7 @@ class QRegisterTable : public RBTree { bool must_undo; public: - QRegisterTable(bool _undo = true) : RBTree(), must_undo(_undo) {} + QRegisterTable(bool _undo = true); inline QRegister * insert(QRegister *reg) @@ -177,9 +177,8 @@ public: inline void initialize(gchar name) { - initialize((gchar []){name, '\0'}); + initialize(CHR2STR(name)); } - void initialize(void); inline QRegister * operator [](const gchar *name) |
