File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class TBitField {
5353 // / @brief Will return the bit at the given position.
5454 // / @param[in] pos The bit position for readout.
5555 // / @return true for bit is set, false for not.
56- bool getBit (size_t pos) const ;
56+ bool constexpr getBit (size_t pos) const noexcept ;
5757
5858 // / @brief Will set the bit at the given position to the given state.
5959 // / @param[in] pos The bit position for write.
@@ -76,12 +76,11 @@ class TBitField {
7676 size_t maxBits () const ;
7777
7878private:
79- T mBitMask = 0 ;
79+ T mBitMask { 0 } ;
8080};
8181
8282template <class T >
83- inline TBitField<T>::TBitField(T init) :
84- mBitMask (init) {
83+ inline TBitField<T>::TBitField(T init) : mBitMask (init) {
8584 // empty
8685}
8786
@@ -91,7 +90,7 @@ inline T TBitField<T>::getMask() const {
9190}
9291
9392template <class T >
94- inline bool TBitField<T>::getBit(size_t pos) const {
93+ inline bool constexpr TBitField<T>::getBit(size_t pos) const noexcept {
9594 assert (pos < maxBits ());
9695 return (mBitMask & (1 << pos)) != 0 ;
9796}
You can’t perform that action at this time.
0 commit comments