summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2014-07-18 17:12:12 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2014-07-18 18:29:19 +0200
commit0078013693c96ad2d0fe7d50d4eb733df2c041ab (patch)
tree388c0d725cf83abac1ba5fee95e970aa8743e0ab /src/corelib
parentec190b0da7e39970957fc2a29f745588f493b876 (diff)
QRingBuffer: purge unused part of the api
Remove unused and untested class functions. Change-Id: I8eb963db0ae4be9b5cdde91f6747c4a1db4ea649 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qringbuffer_p.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h
index 5d25b0add1..2f208d21e3 100644
--- a/src/corelib/tools/qringbuffer_p.h
+++ b/src/corelib/tools/qringbuffer_p.h
@@ -328,17 +328,6 @@ public:
return readSoFar;
}
- inline QByteArray read(int maxLength) {
- QByteArray tmp;
- tmp.resize(qMin(maxLength, size()));
- read(tmp.data(), tmp.size());
- return tmp;
- }
-
- inline QByteArray readAll() {
- return read(size());
- }
-
// read an unspecified amount (will read the first buffer)
inline QByteArray read() {
if (bufferSize == 0)
@@ -387,28 +376,6 @@ public:
bufferSize += qba.length();
}
- inline QByteArray peek(int maxLength) const {
- int bytesToRead = qMin(size(), maxLength);
- if(maxLength <= 0)
- return QByteArray();
- QByteArray ret;
- ret.resize(bytesToRead);
- int readSoFar = 0;
- for (int i = 0; readSoFar < bytesToRead && i < buffers.size(); ++i) {
- int start = 0;
- int end = buffers.at(i).size();
- if (i == 0)
- start = head;
- if (i == tailBuffer)
- end = tail;
- const int len = qMin(ret.size()-readSoFar, end-start);
- memcpy(ret.data()+readSoFar, buffers.at(i).constData()+start, len);
- readSoFar += len;
- }
- Q_ASSERT(readSoFar == ret.size());
- return ret;
- }
-
inline int skip(int length) {
return read(0, length);
}