Skip to content

Commit

Permalink
maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 authored and github-actions[bot] committed May 27, 2024
1 parent 78cbf66 commit 50b119e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
50 changes: 25 additions & 25 deletions CommonLibF4/include/F4SE/Impl/PCH.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,14 @@ namespace F4SE
requires(
const K& a_transparent,
const typename C::key_type& a_key,
typename C::key_compare& a_compare) {
typename C::key_compare::is_transparent;
// clang-format off
typename C::key_compare& a_compare)
{
typename C::key_compare::is_transparent;
// clang-format off
{ a_compare(a_transparent, a_key) } -> std::convertible_to<bool>;
{ a_compare(a_key, a_transparent) } -> std::convertible_to<bool>;
// clang-format on
};
// clang-format on
};

namespace nttp
{
Expand Down Expand Up @@ -142,9 +143,9 @@ namespace F4SE
string(const CharT (&)[N]) -> string<CharT, N - 1>;
}

template <class EF> //
requires(std::invocable<std::remove_reference_t<EF>>) //
class scope_exit
template <class EF> //
requires(std::invocable<std::remove_reference_t<EF>>) //
class scope_exit
{
public:
// 1)
Expand Down Expand Up @@ -286,8 +287,7 @@ namespace F4SE

template <class... Args>
constexpr enumeration(Args... a_values) noexcept //
requires(std::same_as<Args, enum_type> && ...)
:
requires(std::same_as<Args, enum_type>&&...) :
_impl((static_cast<underlying_type>(a_values) | ...))
{}

Expand Down Expand Up @@ -316,15 +316,15 @@ namespace F4SE

template <class... Args>
constexpr enumeration& set(Args... a_args) noexcept //
requires(std::same_as<Args, enum_type> && ...)
requires(std::same_as<Args, enum_type>&&...)
{
_impl |= (static_cast<underlying_type>(a_args) | ...);
return *this;
}

template <class... Args>
constexpr enumeration& reset(Args... a_args) noexcept //
requires(std::same_as<Args, enum_type> && ...)
requires(std::same_as<Args, enum_type>&&...)
{
_impl &= ~(static_cast<underlying_type>(a_args) | ...);
return *this;
Expand All @@ -338,21 +338,21 @@ namespace F4SE

template <class... Args>
[[nodiscard]] constexpr bool any(Args... a_args) const noexcept //
requires(std::same_as<Args, enum_type> && ...)
requires(std::same_as<Args, enum_type>&&...)
{
return (_impl & (static_cast<underlying_type>(a_args) | ...)) != static_cast<underlying_type>(0);
}

template <class... Args>
[[nodiscard]] constexpr bool all(Args... a_args) const noexcept //
requires(std::same_as<Args, enum_type> && ...)
requires(std::same_as<Args, enum_type>&&...)
{
return (_impl & (static_cast<underlying_type>(a_args) | ...)) == (static_cast<underlying_type>(a_args) | ...);
}

template <class... Args>
[[nodiscard]] constexpr bool none(Args... a_args) const noexcept //
requires(std::same_as<Args, enum_type> && ...)
requires(std::same_as<Args, enum_type>&&...)
{
return (_impl & (static_cast<underlying_type>(a_args) | ...)) == static_cast<underlying_type>(0);
}
Expand Down Expand Up @@ -385,72 +385,72 @@ namespace F4SE
#define F4SE_MAKE_ARITHMETIC_OP(a_op) \
template <class E, class U> \
[[nodiscard]] constexpr auto operator a_op(enumeration<E, U> a_enum, U a_shift) noexcept \
-> enumeration<E, U> \
->enumeration<E, U> \
{ \
return static_cast<E>(static_cast<U>(a_enum.get()) a_op a_shift); \
} \
\
template <class E, class U> \
constexpr auto operator a_op##=(enumeration<E, U>& a_enum, U a_shift) noexcept \
-> enumeration<E, U>& \
->enumeration<E, U>& \
{ \
return a_enum = a_enum a_op a_shift; \
}

#define F4SE_MAKE_ENUMERATION_OP(a_op) \
template <class E, class U1, class U2> \
[[nodiscard]] constexpr auto operator a_op(enumeration<E, U1> a_lhs, enumeration<E, U2> a_rhs) noexcept \
-> enumeration<E, std::common_type_t<U1, U2>> \
->enumeration<E, std::common_type_t<U1, U2>> \
{ \
return static_cast<E>(static_cast<U1>(a_lhs.get()) a_op static_cast<U2>(a_rhs.get())); \
} \
\
template <class E, class U> \
[[nodiscard]] constexpr auto operator a_op(enumeration<E, U> a_lhs, E a_rhs) noexcept \
-> enumeration<E, U> \
->enumeration<E, U> \
{ \
return static_cast<E>(static_cast<U>(a_lhs.get()) a_op static_cast<U>(a_rhs)); \
} \
\
template <class E, class U> \
[[nodiscard]] constexpr auto operator a_op(E a_lhs, enumeration<E, U> a_rhs) noexcept \
-> enumeration<E, U> \
->enumeration<E, U> \
{ \
return static_cast<E>(static_cast<U>(a_lhs) a_op static_cast<U>(a_rhs.get())); \
} \
\
template <class E, class U1, class U2> \
constexpr auto operator a_op##=(enumeration<E, U1>& a_lhs, enumeration<E, U2> a_rhs) noexcept \
-> enumeration<E, U1>& \
->enumeration<E, U1>& \
{ \
return a_lhs = a_lhs a_op a_rhs; \
} \
\
template <class E, class U> \
constexpr auto operator a_op##=(enumeration<E, U>& a_lhs, E a_rhs) noexcept \
-> enumeration<E, U>& \
->enumeration<E, U>& \
{ \
return a_lhs = a_lhs a_op a_rhs; \
} \
\
template <class E, class U> \
constexpr auto operator a_op##=(E& a_lhs, enumeration<E, U> a_rhs) noexcept \
-> E& \
->E& \
{ \
return a_lhs = *(a_lhs a_op a_rhs); \
}

#define F4SE_MAKE_INCREMENTER_OP(a_op) \
template <class E, class U> \
constexpr auto operator a_op##a_op(enumeration<E, U>& a_lhs) noexcept \
-> enumeration<E, U>& \
->enumeration<E, U>& \
{ \
return a_lhs a_op## = static_cast<E>(1); \
} \
\
template <class E, class U> \
[[nodiscard]] constexpr auto operator a_op##a_op(enumeration<E, U>& a_lhs, int) noexcept \
-> enumeration<E, U> \
->enumeration<E, U> \
{ \
const auto tmp = a_lhs; \
a_op##a_op a_lhs; \
Expand Down
2 changes: 1 addition & 1 deletion CommonLibF4/include/RE/Bethesda/BSExtraData.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace RE
kLock, // ExtraLock
kTeleport, // ExtraTeleport
kMapMarker,
kLeveledCreature, // ExtraLeveledCreature
kLeveledCreature, // ExtraLeveledCreature
kLevelItem,
kScale,
kSeed,
Expand Down
2 changes: 1 addition & 1 deletion CommonLibF4/include/RE/Bethesda/Events.h
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ namespace RE
}

// members
std::uint32_t formID; // 00
std::uint32_t formID; // 00
};
static_assert(sizeof(TESFormDeleteEvent) == 0x04);

Expand Down

0 comments on commit 50b119e

Please sign in to comment.