- if(length < 0) length = 0;
-
- if(length + 1 >= size) {
- unsigned int * nseq = new unsigned int[size + KB_PREALLOC];
- size += KB_PREALLOC;
- memcpy(nseq, sequence, length * sizeof(unsigned int));
- if(sequence != staticseq) delete sequence;
- sequence = nseq;
- nseq = new unsigned int[size];
- memcpy(nseq, modifiers, length * sizeof(unsigned int));
- if(modifiers != staticmod) delete modifiers;
- modifiers = nseq;
+ //lyxerr << "kb_sequence::addkey: length is [" << length << "]\n"
+ // << "kb_sequence::addkey::key == [" << key << "]\n"
+ // << "kb_sequence::addkey::mod == [" << mod << "]" << endl;
+
+ if (length <= 0) {
+ length = 0;
+ sequence.clear();
+ modifiers.clear();