summaryrefslogtreecommitdiffstats
path: root/src/bufstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bufstr.h')
-rw-r--r--src/bufstr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bufstr.h b/src/bufstr.h
index 576dac7..550ec4d 100644
--- a/src/bufstr.h
+++ b/src/bufstr.h
@@ -53,6 +53,14 @@ class BufStr : public QCString
}
offset+=s;
}
+ void resize( uint newlen )
+ {
+ QCString::resize(newlen);
+ if (offset>newlen)
+ {
+ offset=newlen;
+ }
+ }
private:
uint offset;
const int spareRoom; // 10Kb extra room to avoid frequent resizing