Skip to content

Commit

Permalink
chore: remove unnecessary // before requires clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirdEyeSqueegee committed Sep 28, 2023
1 parent 7bf9978 commit 34226ab
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions CommonLibSF/include/RE/B/BSFixedString.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace RE
}

template <class T>
BSFixedString(const T& a_string) //
BSFixedString(const T& a_string)
requires(std::convertible_to<const T&, std::basic_string_view<value_type>> &&
!std::convertible_to<const T&, const_pointer> &&
!std::same_as<T, BSFixedString<value_type, true>> &&
Expand Down Expand Up @@ -86,7 +86,7 @@ namespace RE
}

template <class T>
BSFixedString& operator=(const T& a_string) //
BSFixedString& operator=(const T& a_string)
requires(std::convertible_to<const T&, std::basic_string_view<value_type>> &&
!std::convertible_to<const T&, const_pointer> &&
!std::same_as<T, BSFixedString<value_type, true>> &&
Expand Down
12 changes: 6 additions & 6 deletions CommonLibSF/include/RE/N/NiSmartPointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace RE
constexpr NiPointer(std::nullptr_t) noexcept {}

template <class Y>
explicit NiPointer(Y* a_rhs) //
explicit NiPointer(Y* a_rhs)
requires(std::convertible_to<Y*, element_type*>)
:
_ptr(static_cast<element_type*>(a_rhs))
Expand All @@ -28,7 +28,7 @@ namespace RE
}

template <class Y>
NiPointer(const NiPointer<Y>& a_rhs) //
NiPointer(const NiPointer<Y>& a_rhs)
requires(std::convertible_to<Y*, element_type*>)
:
_ptr(static_cast<element_type*>(a_rhs._ptr))
Expand All @@ -41,7 +41,7 @@ namespace RE
{}

template <class Y>
NiPointer(NiPointer<Y>&& a_rhs) noexcept //
NiPointer(NiPointer<Y>&& a_rhs) noexcept
requires(std::convertible_to<Y*, element_type*>)
:
_ptr(static_cast<element_type*>(std::exchange(a_rhs._ptr, nullptr)))
Expand All @@ -60,7 +60,7 @@ namespace RE
}

template <class Y>
NiPointer& operator=(const NiPointer<Y>& a_rhs) //
NiPointer& operator=(const NiPointer<Y>& a_rhs)
requires(std::convertible_to<Y*, element_type*>)
{
TryDetach();
Expand All @@ -79,7 +79,7 @@ namespace RE
}

template <class Y>
NiPointer& operator=(NiPointer<Y>&& a_rhs) noexcept //
NiPointer& operator=(NiPointer<Y>&& a_rhs) noexcept
requires(std::convertible_to<Y*, element_type*>)
{
TryDetach();
Expand All @@ -90,7 +90,7 @@ namespace RE
void reset() { TryDetach(); }

template <class Y>
void reset(Y* a_ptr) //
void reset(Y* a_ptr)
requires(std::convertible_to<Y*, element_type*>)
{
if (_ptr != a_ptr) {
Expand Down
6 changes: 3 additions & 3 deletions CommonLibSF/include/RE/T/TESForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ namespace RE
[[nodiscard]] bool Is(FormType a_type) const noexcept { return GetFormType() == a_type; }

template <class... Args>
[[nodiscard]] bool Is(Args... a_args) const noexcept //
[[nodiscard]] bool Is(Args... a_args) const noexcept
requires(std::same_as<Args, FormType> && ...)
{
return (Is(a_args) || ...);
}

template <class T>
[[nodiscard]] bool Is() const noexcept //
[[nodiscard]] bool Is() const noexcept
requires(std::derived_from<T, TESForm> &&
!std::is_pointer_v<T> &&
!std::is_reference_v<T>)
Expand All @@ -178,7 +178,7 @@ namespace RE
[[nodiscard]] bool IsNot(FormType a_type) const noexcept { return !Is(a_type); }

template <class... Args>
[[nodiscard]] bool IsNot(Args... a_args) const noexcept //
[[nodiscard]] bool IsNot(Args... a_args) const noexcept
requires(std::same_as<Args, FormType> && ...)
{
return (IsNot(a_args) && ...);
Expand Down
4 changes: 2 additions & 2 deletions CommonLibSF/include/REL/ID.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace REL
using const_reverse_iterator = typename container_type::const_reverse_iterator;

template <class ExecutionPolicy>
explicit Offset2ID(ExecutionPolicy&& a_policy) //
explicit Offset2ID(ExecutionPolicy&& a_policy)
requires(std::is_execution_policy_v<std::decay_t<ExecutionPolicy>>);

Offset2ID() :
Expand Down Expand Up @@ -279,7 +279,7 @@ namespace REL
};

template <class ExecutionPolicy>
database::Offset2ID::Offset2ID(ExecutionPolicy&& a_policy) //
database::Offset2ID::Offset2ID(ExecutionPolicy&& a_policy)
requires(std::is_execution_policy_v<std::decay_t<ExecutionPolicy>>)
{
const std::span<const mapping_t> id2offset = IDDatabase::get()._id2offset;
Expand Down
10 changes: 5 additions & 5 deletions CommonLibSF/include/REL/Relocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ namespace REL

template <class F, class... Args>
std::invoke_result_t<F, Args...> invoke(F&& a_func, Args&&... a_args) //
noexcept(std::is_nothrow_invocable_v<F, Args...>) //
noexcept(std::is_nothrow_invocable_v<F, Args...>)
requires(std::invocable<F, Args...>)
{
if constexpr (std::is_member_function_pointer_v<std::decay_t<F>>) {
Expand Down Expand Up @@ -237,21 +237,21 @@ namespace REL
return *get();
}

[[nodiscard]] constexpr auto operator->() const noexcept //
[[nodiscard]] constexpr auto operator->() const noexcept
requires(std::is_pointer_v<value_type>)
{
return get();
}

template <class... Args>
std::invoke_result_t<const value_type&, Args...> operator()(Args&&... a_args) const //
noexcept(std::is_nothrow_invocable_v<const value_type&, Args...>) //
noexcept(std::is_nothrow_invocable_v<const value_type&, Args...>)
requires(std::invocable<const value_type&, Args...>)
{
return invoke(get(), std::forward<Args>(a_args)...);
}

std::uintptr_t write_vfunc(std::size_t a_idx, std::uintptr_t a_newFunc) //
std::uintptr_t write_vfunc(std::size_t a_idx, std::uintptr_t a_newFunc)
requires(std::same_as<value_type, std::uintptr_t>)
{
const auto addr = address() + (sizeof(void*) * a_idx);
Expand All @@ -261,7 +261,7 @@ namespace REL
}

template <class F>
std::uintptr_t write_vfunc(std::size_t a_idx, F a_newFunc) //
std::uintptr_t write_vfunc(std::size_t a_idx, F a_newFunc)
requires(std::same_as<value_type, std::uintptr_t>)
{
return write_vfunc(a_idx, stl::unrestricted_cast<std::uintptr_t>(a_newFunc));
Expand Down

0 comments on commit 34226ab

Please sign in to comment.