]> git.lyx.org Git - lyx.git/blobdiff - src/kbsequence.h
Herbert's patch, part 1
[lyx.git] / src / kbsequence.h
index 060f8ae3963b2e88da77f67f8112ae46ea0cf0f6..91c94e045487506f0eb27364ccc99fd83a282bbc 100644 (file)
 #include <vector>
 #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<unsigned int> sequence;
-#endif
        
        ///
-#if 0
-       unsigned int * modifiers;
-#else
        std::vector<unsigned int> 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