diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-27 18:30:35 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-04-17 13:36:50 +0300 |
commit | cc8b0e1746cfc6fdc99582fdb09e7624b14d9d0e (patch) | |
tree | 3a57a6c0fc77d4c2e78657948294b6cc5e18d8e0 /src/mbgl | |
parent | b49517b73705e69d401925658ae0657b8a98b6a6 (diff) | |
download | qtlocation-mapboxgl-cc8b0e1746cfc6fdc99582fdb09e7624b14d9d0e.tar.gz |
[core] Fix performance-noexcept-move-constructor in header files
As reported by clang-tidy-8.
Diffstat (limited to 'src/mbgl')
-rw-r--r-- | src/mbgl/gfx/debug_group.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/programs/segment.hpp | 5 | ||||
-rw-r--r-- | src/mbgl/renderer/paint_property_binder.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/util/tile_cover_impl.hpp | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/mbgl/gfx/debug_group.hpp b/src/mbgl/gfx/debug_group.hpp index b7a25ad467..e5e3630b4c 100644 --- a/src/mbgl/gfx/debug_group.hpp +++ b/src/mbgl/gfx/debug_group.hpp @@ -10,9 +10,7 @@ public: scope->pushDebugGroup(name); } - DebugGroup(DebugGroup&& rhs) : scope(rhs.scope) { - rhs.scope = nullptr; - } + DebugGroup(DebugGroup&& rhs) noexcept : scope(rhs.scope) { rhs.scope = nullptr; } ~DebugGroup() { if (scope) { diff --git a/src/mbgl/programs/segment.hpp b/src/mbgl/programs/segment.hpp index 13e206aa2a..908c0b5f3b 100644 --- a/src/mbgl/programs/segment.hpp +++ b/src/mbgl/programs/segment.hpp @@ -22,6 +22,11 @@ public: indexLength(indexLength_), sortKey(sortKey_) {} + // FIXME: clang-tidy-8 still complains here and clang-cl + // on Windows gives the error: "exception specification of + // explicitly defaulted move constructor does not match + // the calculated one" when marking this 'noexcept'. + // NOLINTNEXTLINE(performance-noexcept-move-constructor) Segment(Segment&&) = default; const std::size_t vertexOffset; diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp index 61544be82d..15dc535556 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -619,7 +619,7 @@ public: (void)z; // Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56958 } - PaintPropertyBinders(PaintPropertyBinders&&) = default; + PaintPropertyBinders(PaintPropertyBinders&&) noexcept = default; PaintPropertyBinders(const PaintPropertyBinders&) = delete; void populateVertexVectors(const GeometryTileFeature& feature, diff --git a/src/mbgl/util/tile_cover_impl.hpp b/src/mbgl/util/tile_cover_impl.hpp index e9c06e44aa..9ef263d12e 100644 --- a/src/mbgl/util/tile_cover_impl.hpp +++ b/src/mbgl/util/tile_cover_impl.hpp @@ -33,7 +33,7 @@ struct Bound { currentPoint = rhs.currentPoint; winding = rhs.winding; } - Bound& operator=(Bound&& rhs) { + Bound& operator=(Bound&& rhs) noexcept { points = std::move(rhs.points); currentPoint = rhs.currentPoint; winding = rhs.winding; |