]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/scintilla/src/SplitVector.h
Apply patch (plus some additional changes) upgrading Scintilla to version 2.03. ...
[wxWidgets.git] / src / stc / scintilla / src / SplitVector.h
index 9d62aef7213555407a4a4e14466e44291aeb8f9b..af4e890e3afa1e11f1cbe832590f583ac5446d0f 100644 (file)
@@ -43,7 +43,7 @@ protected:
        /// reallocating if more space needed.
        void RoomFor(int insertionLength) {
                if (gapLength <= insertionLength) {
-                       if (growSize * 6 < size)
+                       while (growSize < size / 6)
                                growSize *= 2;
                        ReAllocate(size + insertionLength + growSize);
                }
@@ -238,6 +238,12 @@ public:
                DeleteRange(0, lengthBody);
        }
 
+       T* BufferPointer() {
+               RoomFor(1);
+               GapTo(lengthBody);
+               body[lengthBody] = 0;
+               return body;
+       }
 };
 
 #endif