From 0cfd90004bf058a278ff1db3442b523e2bb1b0fa Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 18 Oct 2022 13:13:26 -0400 Subject: fixed_point: Mark std::swap and move constructor as noexcept These shouldn't throw and can influence how some standard algorithms will work. --- src/common/fixed_point.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/fixed_point.h b/src/common/fixed_point.h index cbe76fbf1..ad0d71e50 100644 --- a/src/common/fixed_point.h +++ b/src/common/fixed_point.h @@ -269,7 +269,7 @@ public: public: // constructors FixedPoint() = default; FixedPoint(const FixedPoint&) = default; - FixedPoint(FixedPoint&&) = default; + FixedPoint(FixedPoint&&) noexcept = default; FixedPoint& operator=(const FixedPoint&) = default; template @@ -454,7 +454,7 @@ public: // conversion to basic types } public: - constexpr void swap(FixedPoint& rhs) { + constexpr void swap(FixedPoint& rhs) noexcept { using std::swap; swap(data_, rhs.data_); } -- cgit v1.2.3