mirror of
https://github.com/ETLCPP/etl.git
synced 2026-10-28 18:07:10 +08:00
Removed redundant code
This commit is contained in:
parent
6b14aeec2f
commit
b13b2ae93c
@ -46,36 +46,6 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
//Helper: only performs the v < F check when has_lower == true ––
|
||||
template <bool has_lower, typename U, U F>
|
||||
struct lower_bound_impl;
|
||||
|
||||
// Specialisation for First != 0: enforce v >= First
|
||||
template <typename U, U F>
|
||||
struct lower_bound_impl<true, U, F>
|
||||
{
|
||||
static ETL_CONSTEXPR auto apply(U& v) ETL_NOEXCEPT -> void
|
||||
{
|
||||
if (v < F)
|
||||
{
|
||||
v = F;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Specialisation for First == 0: no-op
|
||||
template <typename U, U F>
|
||||
struct lower_bound_impl<false, U, F>
|
||||
{
|
||||
static ETL_CONSTEXPR auto apply(U&) ETL_NOEXCEPT -> void
|
||||
{
|
||||
// nothing
|
||||
}
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
//***************************************************************************
|
||||
/// Provides a value that cycles between two limits.
|
||||
//***************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user