X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fkbsequence.h;h=91c94e045487506f0eb27364ccc99fd83a282bbc;hb=00d24ec87650e4ac7db77ad54cb4aa2f688100f3;hp=060f8ae3963b2e88da77f67f8112ae46ea0cf0f6;hpb=acb3eecb5d542eefbd4b50fa8ce9d819642588f6;p=lyx.git diff --git a/src/kbsequence.h b/src/kbsequence.h index 060f8ae396..91c94e0454 100644 --- a/src/kbsequence.h +++ b/src/kbsequence.h @@ -16,10 +16,6 @@ #include #include "LString.h" -#if 0 -#define KB_PREALLOC 16 -#endif - class kb_keymap; /// Holds a key sequence and the current and standard keymaps @@ -28,26 +24,9 @@ public: /// kb_sequence() { stdmap = curmap = 0; -#if 0 - sequence = staticseq; - modifiers = staticmod; -#endif length = 0; -#if 0 - size = KB_PREALLOC; -#endif } -#if 0 - /// - ~kb_sequence() { - if (sequence != staticseq) { - delete sequence; - delete modifiers; - } - } -#endif - /** Add a key to the key sequence and look it up in the curmap if the latter is defined. */ int addkey(unsigned int key, unsigned int mod, unsigned int nmod = 0); @@ -60,7 +39,7 @@ public: /// Make length negative to mark the sequence as deleted void delseq(); - + /// char getiso() const; @@ -81,32 +60,13 @@ public: /** Array holding the current key sequence. If sequence[length-1] < 0xff it can be used as ISO8859 char */ -#if 0 - unsigned int * sequence; -#else std::vector sequence; -#endif /// -#if 0 - unsigned int * modifiers; -#else std::vector modifiers; -#endif /// Current length of key sequence int length; -#if 0 -private: - /// Static array preallocated for sequence - unsigned int staticseq[KB_PREALLOC]; - - /// - unsigned int staticmod[KB_PREALLOC]; - - /// Physically allocated storage size - int size; -#endif }; #endif