Skip to content

Commit

Permalink
Merge branch 'dev-1.6.640' of https://github.com/powerof3/CommonLibSSE
Browse files Browse the repository at this point in the history
…into dev-1.6.640
  • Loading branch information
powerof3 committed Oct 18, 2024
2 parents f93a1c9 + 40d5fc1 commit e83cfcb
Show file tree
Hide file tree
Showing 25 changed files with 135 additions and 154 deletions.
2 changes: 2 additions & 0 deletions cmake/sourcelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1660,9 +1660,11 @@ set(SOURCES
include/REL/Version.h
include/REX/PS4.h
include/REX/PS4/SCEPAD.h
include/REX/REX.h
include/REX/W32.h
include/REX/W32/ADVAPI32.h
include/REX/W32/BASE.h
include/REX/W32/BCRYPT.h
include/REX/W32/COM.h
include/REX/W32/COMPTR.h
include/REX/W32/D3D.h
Expand Down
26 changes: 12 additions & 14 deletions include/RE/B/BSTHashMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ namespace RE
entry_type(const entry_type&) = delete;

entry_type(entry_type&& a_rhs) //
noexcept(std::is_nothrow_move_constructible_v<value_type> &&
std::is_nothrow_destructible_v<value_type>)
noexcept(std::is_nothrow_move_constructible_v<value_type>&&
std::is_nothrow_destructible_v<value_type>)
{
if (a_rhs.has_value()) {
const auto rnext = a_rhs.next;
Expand All @@ -57,8 +57,8 @@ namespace RE
entry_type& operator=(const entry_type&) = delete;

entry_type& operator=(entry_type&& a_rhs) //
noexcept(std::is_nothrow_move_constructible_v<value_type> &&
std::is_nothrow_destructible_v<value_type>)
noexcept(std::is_nothrow_move_constructible_v<value_type>&&
std::is_nothrow_destructible_v<value_type>)
{
if (this != std::addressof(a_rhs)) {
destroy();
Expand Down Expand Up @@ -94,8 +94,8 @@ namespace RE
}

[[nodiscard]] value_type steal() && //
noexcept(std::is_nothrow_move_constructible_v<value_type> &&
std::is_nothrow_destructible_v<value_type>)
noexcept(std::is_nothrow_move_constructible_v<value_type>&&
std::is_nothrow_destructible_v<value_type>)
{
assert(has_value());
value_type val = std::move(value);
Expand Down Expand Up @@ -130,8 +130,7 @@ namespace RE

template <class V>
iterator_base(const iterator_base<V>& a_rhs) noexcept //
requires(std::convertible_to<typename iterator_base<V>::reference, reference>)
:
requires(std::convertible_to<typename iterator_base<V>::reference, reference>) :
_first(a_rhs._first),
_last(a_rhs._last)
{}
Expand Down Expand Up @@ -222,8 +221,7 @@ namespace RE
BSTScatterTable(const BSTScatterTable& a_rhs) { insert(a_rhs.begin(), a_rhs.end()); }

BSTScatterTable(BSTScatterTable&& a_rhs) noexcept //
requires(std::same_as<typename allocator_type::propagate_on_container_move_assignment, std::true_type>)
:
requires(std::same_as<typename allocator_type::propagate_on_container_move_assignment, std::true_type>) :
_capacity(std::exchange(a_rhs._capacity, 0)),
_free(std::exchange(a_rhs._free, 0)),
_good(std::exchange(a_rhs._good, 0)),
Expand Down Expand Up @@ -540,15 +538,15 @@ namespace RE
}

[[nodiscard]] size_type hash_function(const key_type& a_key) const //
noexcept(std::is_nothrow_constructible_v<hasher> &&
std::is_nothrow_invocable_v<const hasher&, const key_type&>)
noexcept(std::is_nothrow_constructible_v<hasher>&&
std::is_nothrow_invocable_v<const hasher&, const key_type&>)
{
return static_cast<size_type>(hasher()(a_key));
}

[[nodiscard]] bool key_eq(const key_type& a_lhs, const key_type& a_rhs) const //
noexcept(std::is_nothrow_constructible_v<key_equal> &&
std::is_nothrow_invocable_v<const key_equal&, const key_type&, const key_type&>)
noexcept(std::is_nothrow_constructible_v<key_equal>&&
std::is_nothrow_invocable_v<const key_equal&, const key_type&, const key_type&>)
{
return static_cast<bool>(key_equal()(a_lhs, a_rhs));
}
Expand Down
85 changes: 40 additions & 45 deletions include/RE/B/BSTTuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ namespace RE

// 1)
BSTTuple() //
noexcept(std::is_nothrow_default_constructible_v<first_type> &&
std::is_nothrow_default_constructible_v<second_type>) //
requires(std::is_default_constructible_v<first_type> &&
std::is_default_constructible_v<second_type>)
:
noexcept(std::is_nothrow_default_constructible_v<first_type>&&
std::is_nothrow_default_constructible_v<second_type>) //
requires(std::is_default_constructible_v<first_type>&&
std::is_default_constructible_v<second_type>) :
first(),
second()
{}
Expand All @@ -26,11 +25,10 @@ namespace RE
explicit(!std::is_convertible_v<const first_type&, first_type> ||
!std::is_convertible_v<const second_type&, second_type>) //
BSTTuple(const first_type& a_first, const second_type& a_second) //
noexcept(std::is_nothrow_copy_constructible_v<first_type> &&
std::is_nothrow_copy_constructible_v<second_type>) //
requires(std::is_copy_constructible_v<first_type> &&
std::is_copy_constructible_v<second_type>)
:
noexcept(std::is_nothrow_copy_constructible_v<first_type>&&
std::is_nothrow_copy_constructible_v<second_type>) //
requires(std::is_copy_constructible_v<first_type>&&
std::is_copy_constructible_v<second_type>) :
first(a_first),
second(a_second)
{}
Expand All @@ -40,11 +38,10 @@ namespace RE
explicit(!std::is_convertible_v<U1&&, first_type> ||
!std::is_convertible_v<U2&&, second_type>) //
BSTTuple(U1&& a_first, U2&& a_second) //
noexcept(std::is_nothrow_constructible_v<first_type, U1&&> &&
std::is_nothrow_constructible_v<second_type, U2&&>) //
requires(std::is_constructible_v<first_type, U1 &&> &&
std::is_constructible_v<second_type, U2 &&>)
:
noexcept(std::is_nothrow_constructible_v<first_type, U1&&>&&
std::is_nothrow_constructible_v<second_type, U2&&>) //
requires(std::is_constructible_v<first_type, U1&&>&&
std::is_constructible_v<second_type, U2&&>) :
first(std::forward<U1>(a_first)),
second(std::forward<U2>(a_second))
{}
Expand All @@ -54,11 +51,10 @@ namespace RE
explicit(!std::is_convertible_v<const U1&, first_type> ||
!std::is_convertible_v<const U2&, second_type>) //
BSTTuple(const BSTTuple<U1, U2>& a_rhs) //
noexcept(std::is_nothrow_constructible_v<first_type, const U1&> &&
std::is_nothrow_constructible_v<second_type, const U2&>) //
requires(std::is_constructible_v<first_type, const U1&> &&
std::is_constructible_v<second_type, const U2&>)
:
noexcept(std::is_nothrow_constructible_v<first_type, const U1&>&&
std::is_nothrow_constructible_v<second_type, const U2&>) //
requires(std::is_constructible_v<first_type, const U1&>&&
std::is_constructible_v<second_type, const U2&>) :
first(a_rhs.first),
second(a_rhs.second)
{}
Expand All @@ -68,11 +64,10 @@ namespace RE
explicit(!std::is_convertible_v<U1&&, first_type> ||
!std::is_convertible_v<U2&&, second_type>) //
BSTTuple(BSTTuple<U1, U2>&& a_rhs) //
noexcept(std::is_nothrow_constructible_v<first_type, U1&&> &&
std::is_nothrow_constructible_v<second_type, U2&&>) //
requires(std::is_constructible_v<first_type, U1 &&> &&
std::is_constructible_v<second_type, U2 &&>)
:
noexcept(std::is_nothrow_constructible_v<first_type, U1&&>&&
std::is_nothrow_constructible_v<second_type, U2&&>) //
requires(std::is_constructible_v<first_type, U1&&>&&
std::is_constructible_v<second_type, U2&&>) :
first(std::forward<U1>(a_rhs.first)),
second(std::forward<U2>(a_rhs.second))
{}
Expand Down Expand Up @@ -108,10 +103,10 @@ namespace RE

// 1)
BSTTuple& operator=(const BSTTuple& a_rhs) //
noexcept(std::is_nothrow_copy_assignable_v<first_type> &&
std::is_nothrow_copy_assignable_v<second_type>) //
requires(std::is_copy_assignable_v<first_type> &&
std::is_copy_assignable_v<second_type>)
noexcept(std::is_nothrow_copy_assignable_v<first_type>&&
std::is_nothrow_copy_assignable_v<second_type>) //
requires(std::is_copy_assignable_v<first_type>&&
std::is_copy_assignable_v<second_type>)
{
if (this != std::addressof(a_rhs)) {
first = a_rhs.first;
Expand All @@ -123,10 +118,10 @@ namespace RE
// 2)
template <class U1, class U2>
BSTTuple& operator=(const BSTTuple<U1, U2>& a_rhs) //
noexcept(std::is_nothrow_assignable_v<first_type&, const U1&> &&
std::is_nothrow_assignable_v<second_type&, const U2&>) //
requires(std::is_assignable_v<first_type&, const U1&> &&
std::is_assignable_v<second_type&, const U2&>)
noexcept(std::is_nothrow_assignable_v<first_type&, const U1&>&&
std::is_nothrow_assignable_v<second_type&, const U2&>) //
requires(std::is_assignable_v<first_type&, const U1&>&&
std::is_assignable_v<second_type&, const U2&>)
{
first = a_rhs.first;
second = a_rhs.second;
Expand All @@ -135,10 +130,10 @@ namespace RE

// 3)
BSTTuple& operator=(BSTTuple&& a_rhs) //
noexcept(std::is_nothrow_move_assignable_v<first_type> &&
std::is_nothrow_move_assignable_v<second_type>) //
requires(std::is_move_assignable_v<first_type> &&
std::is_move_assignable_v<second_type>)
noexcept(std::is_nothrow_move_assignable_v<first_type>&&
std::is_nothrow_move_assignable_v<second_type>) //
requires(std::is_move_assignable_v<first_type>&&
std::is_move_assignable_v<second_type>)
{
if (this != std::addressof(a_rhs)) {
first = std::move(a_rhs.first);
Expand All @@ -150,10 +145,10 @@ namespace RE
// 4)
template <class U1, class U2>
BSTTuple& operator=(BSTTuple<U1, U2>&& a_rhs) //
noexcept(std::is_nothrow_assignable_v<first_type&, U1> &&
std::is_nothrow_assignable_v<second_type&, U2>) //
requires(std::is_assignable_v<first_type&, U1> &&
std::is_assignable_v<second_type&, U2>)
noexcept(std::is_nothrow_assignable_v<first_type&, U1>&&
std::is_nothrow_assignable_v<second_type&, U2>) //
requires(std::is_assignable_v<first_type&, U1>&&
std::is_assignable_v<second_type&, U2>)
{
first = std::move(a_rhs.first);
second = std::move(a_rhs.second);
Expand All @@ -163,8 +158,8 @@ namespace RE
TES_HEAP_REDEFINE_NEW();

void swap(BSTTuple& a_rhs) //
noexcept(std::is_nothrow_swappable_v<first_type> &&
std::is_nothrow_swappable_v<second_type>)
noexcept(std::is_nothrow_swappable_v<first_type>&&
std::is_nothrow_swappable_v<second_type>)
{
using std::swap;
if (this != std::addressof(a_rhs)) {
Expand Down Expand Up @@ -216,8 +211,8 @@ namespace RE
template <class T1, class T2>
void swap(BSTTuple<T1, T2>& a_lhs, BSTTuple<T1, T2>& a_rhs) //
noexcept(noexcept(a_lhs.swap(a_rhs))) //
requires(std::is_swappable_v<T1> &&
std::is_swappable_v<T2>)
requires(std::is_swappable_v<T1>&&
std::is_swappable_v<T2>)
{
a_lhs.swap(a_rhs);
}
Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BSTempEffectParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ namespace RE
static BSTempEffectParticle* Spawn(TESObjectCELL* a_cell, float a_lifetime, const char* a_modelName, const NiPoint3& a_rotation, const NiPoint3& a_position, float a_scale, std::uint32_t a_flags, NiAVObject* a_target)
{
using func_t = BSTempEffectParticle* (*)(TESObjectCELL*, float, const char*, const NiPoint3&, const NiPoint3&, float, std::uint32_t, NiAVObject*);
static REL::Relocation<func_t> func{ RELOCATION_ID(29218, 30071) };
static REL::Relocation<func_t> func{ RELOCATION_ID(29218, 30071) };
return func(a_cell, a_lifetime, a_modelName, a_rotation, a_position, a_scale, a_flags, a_target);
}
static BSTempEffectParticle* Spawn(TESObjectCELL* a_cell, float a_lifetime, const char* a_modelName, const NiMatrix3& a_normal, const NiPoint3& a_position, float a_scale, std::uint32_t a_flags, NiAVObject* a_target)
{
using func_t = BSTempEffectParticle* (*)(TESObjectCELL*, float, const char*, const NiMatrix3&, const NiPoint3&, float, std::uint32_t, NiAVObject*);
static REL::Relocation<func_t> func{ RELOCATION_ID(29219, 30072) };
static REL::Relocation<func_t> func{ RELOCATION_ID(29219, 30072) };
return func(a_cell, a_lifetime, a_modelName, a_normal, a_position, a_scale, a_flags, a_target);
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/C/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace RE
constexpr Color(std::uint32_t a_hexValue) noexcept :
red((a_hexValue >> 16) & 0xFF),
green((a_hexValue >> 8) & 0xFF),
blue((a_hexValue) & 0xFF),
blue((a_hexValue)&0xFF),
alpha(0)
{}

Expand Down
4 changes: 2 additions & 2 deletions include/RE/C/CombatMagicCaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ namespace RE

bool CheckTargetValid(const CombatController* a_combatController)
{
using func_t = bool* (*)(CombatMagicCaster*, const CombatController*);
using func_t = bool* (*)(CombatMagicCaster*, const CombatController*);
static REL::Relocation<func_t> func{ RELOCATION_ID(43956, 45348) };
return func(this, a_combatController);
}

static bool CheckTargetValid(const CombatController* a_combatController, Actor* a_target, const CombatInventoryItemMagic* a_inventoryItem)
{
using func_t = bool* (*)(const CombatController*, Actor*, const CombatInventoryItemMagic*);
using func_t = bool* (*)(const CombatController*, Actor*, const CombatInventoryItemMagic*);
static REL::Relocation<func_t> func{ RELOCATION_ID(43952, 45343) };
return func(a_combatController, a_target, a_inventoryItem);
}
Expand Down
8 changes: 4 additions & 4 deletions include/RE/G/GArrayBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace RE
iterator operator++(std::int32_t)
{
iterator it(*this);
operator++();
operator++();
return it;
}

Expand All @@ -68,7 +68,7 @@ namespace RE
iterator operator--(std::int32_t)
{
iterator it(*this);
operator--();
operator--();
return it;
}

Expand Down Expand Up @@ -164,7 +164,7 @@ namespace RE
const_iterator operator++(std::int32_t)
{
const_iterator it(*this);
operator++();
operator++();
return it;
}

Expand All @@ -180,7 +180,7 @@ namespace RE
const_iterator operator--(std::int32_t)
{
const_iterator it(*this);
operator--();
operator--();
return it;
}

Expand Down
4 changes: 2 additions & 2 deletions include/RE/G/GList.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ namespace RE
iterator_base operator++(int)
{
iterator_base tmp{ *this };
operator++();
operator++();
return tmp;
}

Expand All @@ -146,7 +146,7 @@ namespace RE
iterator_base operator--(int)
{
iterator_base tmp{ *this };
operator--();
operator--();
return tmp;
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/H/hkBaseTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace RE
explicit hkHalf(const float& a_val);

hkHalf& operator=(const float& a_val);
operator float() const;
operator float() const;

protected:
void SetFloat(const float& a_val);
Expand Down
2 changes: 1 addition & 1 deletion include/RE/I/IVirtualMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace RE
void RegisterLatentFunction(std::string_view a_fnName, std::string_view a_className, F a_callback, bool a_callableFromTasklets = false);

template <class V>
requires is_return_convertible_v<V>
requires is_return_convertible_v<V>
void ReturnLatentResult(VMStackID a_stackID, V result);

void SetCallableFromTasklets(const char* a_className, const char* a_stateName, const char* a_fnName, bool a_callable);
Expand Down
2 changes: 1 addition & 1 deletion include/RE/N/NativeLatentFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ namespace RE
*/
template <class V>
requires is_return_convertible_v<V>
requires is_return_convertible_v<V>
void IVirtualMachine::ReturnLatentResult(VMStackID a_stackID, V a_result)
{
auto var = RE::BSScript::Variable::Variable();
Expand Down
2 changes: 1 addition & 1 deletion include/RE/N/NiColor.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace RE
constexpr NiColor(std::uint32_t a_hexValue) noexcept :
red(((a_hexValue >> 16) & 0xFF) / 255.0f),
green(((a_hexValue >> 8) & 0xFF) / 255.0f),
blue(((a_hexValue) & 0xFF) / 255.0f)
blue(((a_hexValue)&0xFF) / 255.0f)
{
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/N/NiTMapBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ namespace RE
iterator_base operator++(int)
{
iterator_base tmp(*this);
operator++();
operator++();
return tmp;
}

Expand Down
Loading

0 comments on commit e83cfcb

Please sign in to comment.