From 914e1f360868e844577dd98a179a7c8bc37bf272 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Sat, 27 Oct 2012 16:45:32 +0200 Subject: Remove some dead code in switch statements Following the Code Style described in http://qt-project.org/wiki/Qt_Coding_Style#e289ee44592e9c32d4212069f0806daf There is no need for a 'break' after a 'return'. Change-Id: I1eca350391a7e4e14e504d60b24b69982cc5ac47 Reviewed-by: Thiago Macieira --- src/gui/image/qimage.cpp | 10 ---------- src/gui/opengl/qopenglframebufferobject.cpp | 1 - src/gui/painting/qpathclipper.cpp | 1 - 3 files changed, 12 deletions(-) (limited to 'src/gui') diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 25999b7d06..9da360bc26 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4915,43 +4915,33 @@ int QImage::metric(PaintDeviceMetric metric) const switch (metric) { case PdmWidth: return d->width; - break; case PdmHeight: return d->height; - break; case PdmWidthMM: return qRound(d->width * 1000 / d->dpmx); - break; case PdmHeightMM: return qRound(d->height * 1000 / d->dpmy); - break; case PdmNumColors: return d->colortable.size(); - break; case PdmDepth: return d->depth; - break; case PdmDpiX: return qRound(d->dpmx * 0.0254); - break; case PdmDpiY: return qRound(d->dpmy * 0.0254); - break; case PdmPhysicalDpiX: return qRound(d->dpmx * 0.0254); - break; case PdmPhysicalDpiY: return qRound(d->dpmy * 0.0254); - break; default: qWarning("QImage::metric(): Unhandled metric type %d", metric); diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index ef8e420c27..380ada37e0 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -349,7 +349,6 @@ bool QOpenGLFramebufferObjectPrivate::checkFramebufferStatus(QOpenGLContext *ctx case GL_NO_ERROR: case GL_FRAMEBUFFER_COMPLETE: return true; - break; case GL_FRAMEBUFFER_UNSUPPORTED: qDebug("QOpenGLFramebufferObject: Unsupported framebuffer format."); break; diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index 8cf57a8987..4b53257832 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -1630,7 +1630,6 @@ QPainterPath QPathClipper::clip(Operation operation) result.addRect(subjectBounds); return result; } - break; case BoolAnd: return clipPath; case BoolOr: -- cgit v1.2.3