From 2da547d40c6cb19a835f795acfcf650d7d76d3fd Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 22 Feb 2022 17:15:41 +1000 Subject: [PATCH] Fix some build warnings --- src/app/maptools/qgsmaptoolshaperectangle3points.cpp | 2 ++ src/gui/annotations/qgscreateannotationitemmaptool_impl.cpp | 3 +-- src/gui/qgsmaptoolcapture.cpp | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/maptools/qgsmaptoolshaperectangle3points.cpp b/src/app/maptools/qgsmaptoolshaperectangle3points.cpp index de96f86e883..dd99c9a727f 100644 --- a/src/app/maptools/qgsmaptoolshaperectangle3points.cpp +++ b/src/app/maptools/qgsmaptoolshaperectangle3points.cpp @@ -37,6 +37,7 @@ QString QgsMapToolShapeRectangle3PointsMetadata::id() const case CreateMode::Projected: return QgsMapToolShapeRectangle3PointsMetadata::TOOL_ID_PROJECTED; } + BUILTIN_UNREACHABLE } QString QgsMapToolShapeRectangle3PointsMetadata::name() const @@ -48,6 +49,7 @@ QString QgsMapToolShapeRectangle3PointsMetadata::name() const case CreateMode::Projected: return QObject::tr( "Rectangle from 3 points (projected)" ); } + BUILTIN_UNREACHABLE } QIcon QgsMapToolShapeRectangle3PointsMetadata::icon() const diff --git a/src/gui/annotations/qgscreateannotationitemmaptool_impl.cpp b/src/gui/annotations/qgscreateannotationitemmaptool_impl.cpp index 08ad972dff4..364b0efe892 100644 --- a/src/gui/annotations/qgscreateannotationitemmaptool_impl.cpp +++ b/src/gui/annotations/qgscreateannotationitemmaptool_impl.cpp @@ -73,11 +73,10 @@ bool QgsMapToolCaptureAnnotationItem::supportsTechnique( CaptureTechnique techni case CaptureTechnique::Shape: return true; } + BUILTIN_UNREACHABLE } - - // // QgsCreatePointTextItemMapTool // diff --git a/src/gui/qgsmaptoolcapture.cpp b/src/gui/qgsmaptoolcapture.cpp index 9beac21619c..bf3f0c658c2 100644 --- a/src/gui/qgsmaptoolcapture.cpp +++ b/src/gui/qgsmaptoolcapture.cpp @@ -105,6 +105,7 @@ bool QgsMapToolCapture::supportsTechnique( QgsMapToolCapture::CaptureTechnique t case CaptureTechnique::Shape: return false; } + BUILTIN_UNREACHABLE } void QgsMapToolCapture::activate()