diff options
| author | Lioncash <mathew1800@gmail.com> | 2022-10-18 13:13:26 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2022-10-18 16:06:50 -0400 |
| commit | 278826ce5ba414cbcd82aae8402f620cdae81660 (patch) | |
| tree | b4c2c645662b59adbcb8c6e5ab68779a8f1f8882 /src/common/fixed_point.h | |
| parent | 3ba285f09e830d7f2f639efb3a10978135de00f2 (diff) | |
fixed_point: Mark std::swap and move constructor as noexcept
These shouldn't throw and can influence how some standard algorithms
will work.
Diffstat (limited to 'src/common/fixed_point.h')
| -rw-r--r-- | src/common/fixed_point.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/fixed_point.h b/src/common/fixed_point.h index cbe76fbf1f..ad0d71e502 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 <IsArithmetic Number> @@ -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_); } |
