summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-02-28 22:52:41 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-29 00:05:38 +0100
commitaac821c220662ec9d1acbf88ac82603bbda3cee8 (patch)
treedf64d19d7037d99ddee317f4174cf60f8403eb5b
parent1e3015d8f4c5b3c04e412dfa8f87def0922c52d9 (diff)
QRingBuffer: make constructor explicit
This is a private class, but it's so close to the classical Stack(int) example for explicit that I just have to make this ctor explicit, too: QRingBuffer rb = 0; // oops: meant '*rb' now no longer compiles. Change-Id: I7d58c1f08c1b14d14930426159c5c8db71b4cf4d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
-rw-r--r--src/corelib/tools/qringbuffer_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h
index 46e505099a..c248477f2c 100644
--- a/src/corelib/tools/qringbuffer_p.h
+++ b/src/corelib/tools/qringbuffer_p.h
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
class QRingBuffer
{
public:
- inline QRingBuffer(int growth = 4096) : basicBlockSize(growth) {
+ explicit inline QRingBuffer(int growth = 4096) : basicBlockSize(growth) {
buffers << QByteArray();
clear();
}