From aac821c220662ec9d1acbf88ac82603bbda3cee8 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 28 Feb 2012 22:52:41 +0100 Subject: 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 --- src/corelib/tools/qringbuffer_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools') 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(); } -- cgit v1.2.3