OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46be253
)
avoid QByteArray resizing in QRingBuffer::ungetChar()
author
Ivailo Monev
<xakepa10@gmail.com>
Tue, 10 Aug 2021 18:52:47 +0000
(21:52 +0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Tue, 10 Aug 2021 18:52:47 +0000
(21:52 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/tools/qringbuffer_p.h
patch
|
blob
|
history
diff --git
a/src/core/tools/qringbuffer_p.h
b/src/core/tools/qringbuffer_p.h
index
6d65d19
..
8a89163
100644
(file)
--- a/
src/core/tools/qringbuffer_p.h
+++ b/
src/core/tools/qringbuffer_p.h
@@
-224,8
+224,7
@@
public:
inline void ungetChar(char c) {
--head;
if (head < 0) {
- buffers.prepend(QByteArray());
- buffers[0].resize(QT_BUFFSIZE);
+ buffers.prepend(QByteArray(QT_BUFFSIZE, Qt::Uninitialized));
head = QT_BUFFSIZE - 1;
++tailBuffer;
}