From 81b57ecf7c63756d3d59c9006c9f42ba48235c3f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 26 Jul 2019 22:18:40 -0400 Subject: [PATCH] Adds `noexcept`. --- ClockReceiver/ClockReceiver.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ClockReceiver/ClockReceiver.hpp b/ClockReceiver/ClockReceiver.hpp index ecfccec27..482025d52 100644 --- a/ClockReceiver/ClockReceiver.hpp +++ b/ClockReceiver/ClockReceiver.hpp @@ -54,8 +54,8 @@ */ template class WrappedInt { public: - forceinline constexpr WrappedInt(int l) : length_(l) {} - forceinline constexpr WrappedInt() : length_(0) {} + forceinline constexpr WrappedInt(int l) noexcept : length_(l) {} + forceinline constexpr WrappedInt() noexcept : length_(0) {} forceinline T &operator =(const T &rhs) { length_ = rhs.length_; @@ -165,19 +165,19 @@ template class WrappedInt { /// Describes an integer number of whole cycles: pairs of clock signal transitions. class Cycles: public WrappedInt { public: - forceinline constexpr Cycles(int l) : WrappedInt(l) {} - forceinline constexpr Cycles() : WrappedInt() {} - forceinline constexpr Cycles(const Cycles &cycles) : WrappedInt(cycles.length_) {} + forceinline constexpr Cycles(int l) noexcept : WrappedInt(l) {} + forceinline constexpr Cycles() noexcept : WrappedInt() {} + forceinline constexpr Cycles(const Cycles &cycles) noexcept : WrappedInt(cycles.length_) {} }; /// Describes an integer number of half cycles: single clock signal transitions. class HalfCycles: public WrappedInt { public: - forceinline constexpr HalfCycles(int l) : WrappedInt(l) {} - forceinline constexpr HalfCycles() : WrappedInt() {} + forceinline constexpr HalfCycles(int l) noexcept : WrappedInt(l) {} + forceinline constexpr HalfCycles() noexcept : WrappedInt() {} - forceinline constexpr HalfCycles(const Cycles cycles) : WrappedInt(cycles.as_int() * 2) {} - forceinline constexpr HalfCycles(const HalfCycles &half_cycles) : WrappedInt(half_cycles.length_) {} + forceinline constexpr HalfCycles(const Cycles cycles) noexcept : WrappedInt(cycles.as_int() * 2) {} + forceinline constexpr HalfCycles(const HalfCycles &half_cycles) noexcept : WrappedInt(half_cycles.length_) {} /// @returns The number of whole cycles completely covered by this span of half cycles. forceinline constexpr Cycles cycles() const {