diff options
author | kcgen <kcgen@users.noreply.github.com> | 2022-06-10 18:08:25 +0300 |
---|---|---|
committer | kcgen <kcgen@users.noreply.github.com> | 2022-06-10 18:08:25 +0300 |
commit | 48bd51be6395fa44e38a8566a8ed040a9237807b (patch) | |
tree | bfa125b0aa44baa4214431c6b00244431995991d | |
parent | 986b5d0b7a61fa8f2f8b43f35422e8fe3c21841b (diff) |
Use consistent comments in bit_viewkc/bit_view-bool-compare-1
-rw-r--r-- | include/bit_view.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/bit_view.h b/include/bit_view.h index 5baed26fe..d079f19c0 100644 --- a/include/bit_view.h +++ b/include/bit_view.h @@ -136,19 +136,17 @@ public: template <class rhs_type> constexpr bit_view(const rhs_type rhs_value) noexcept { - // leverage the assignment operator to check the type, shift and - // mask the value, and assign into our view's bits + // use the = operator to save the value into the view *this = rhs_value; } // copy constructor - constexpr bit_view(const bit_view &other) + constexpr bit_view(const bit_view &other) noexcept { // get the other view's value using the data_type() operator const data_type d = other; - // use the assignment operator to check the type, shift and mask - // the value, and assign into our view's bits + // use the = operator to save the value into the view *this = d; } @@ -179,8 +177,7 @@ public: // get the other view's value using the data_type() operator const data_type d = other; - // use the assignment operator to check the type, shift and mask - // the value, and assign into our view's bits + // use the = operator to save the value into the view return *this = d; } @@ -193,6 +190,7 @@ public: // pre-increment the view's value constexpr bit_view &operator++() noexcept { + // use the = operator to save the value into the view return *this = *this + 1; } @@ -209,12 +207,14 @@ public: constexpr bit_view &operator+=(const rhs_type rhs_value) noexcept { check_rhs(rhs_value); + // use the = operator to save the value into the view return *this = *this + rhs_value; } // pre-decrement the view's value constexpr bit_view &operator--() noexcept { + // use the = operator to save the value into the view return *this = *this - 1; } |