From 5f09f2bb3383bc51e3c965f555fac0c73dbe6dd8 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Wed, 3 Dec 2014 17:44:58 +0200 Subject: Simplify QRingBuffer::isEmpty() Also, make it consistent with size(). Change-Id: Ie5285e3c07ebba2d2eea05a80a75ce148da47d7b Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/qringbuffer_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qringbuffer_p.h') diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h index 0066d3d1b6..58227d6755 100644 --- a/src/corelib/tools/qringbuffer_p.h +++ b/src/corelib/tools/qringbuffer_p.h @@ -174,7 +174,7 @@ public: } inline bool isEmpty() const { - return tailBuffer == 0 && tail == 0; + return bufferSize == 0; } inline int getChar() { -- cgit v1.2.3