Skip to content

Commit

Permalink
Remove unoptimized | and |= test
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhD committed Aug 24, 2020
1 parent ed8ea35 commit 4c3b876
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions include/itsy/detail/bit_sequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,13 +769,6 @@ namespace ITSY_BITSY_SOURCE_NAMESPACE
__left.cbegin(), __left.cend(), __right.cbegin(), __right.cend(), ::std::less<bool>());
}

template <typename _RightContainer>
constexpr __bit_sequence&
operator|=(const __bit_sequence<_RightContainer>& __right) {
_M_do_or(__right);
return *this;
}

private:
size_type _M_bit_pos = 0;

Expand Down Expand Up @@ -1233,27 +1226,8 @@ namespace ITSY_BITSY_SOURCE_NAMESPACE
}
return __current_pos;
}

template <typename _RightContainer>
constexpr void
_M_do_or(const __bit_sequence<_RightContainer>& __right) {
auto __left_it = this->begin();
const auto __left_last = this->end();
auto __right_it = __right.cbegin();
const auto __right_last = __right.cend();
for (;__left_it != __left_last && __right_it != __right_last;) {
*__left_it |= *__right_it;
}
}
};

template<typename _LeftContainer, typename _RightContainer>
auto operator|(const __bit_sequence<_LeftContainer>& __left, const __bit_sequence<_RightContainer>& __right) {
auto result = __left;
result |= __right;
return result;
}

} // namespace ITSY_BITSY_SOURCE_NAMESPACE

// clean up macros: don't leak anything
Expand Down

0 comments on commit 4c3b876

Please sign in to comment.