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>
bb10
Marc Mutz 2012-02-28 22:52:41 +01:00 committed by Qt by Nokia
parent 1e3015d8f4
commit aac821c220
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}