Skip to content

Commit

Permalink
ci: maintenance 2023-11-06
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 6, 2023
1 parent b4892cd commit 16890e5
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 47 deletions.
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/B/BGSBlockBashData.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace RE
{
class BGSImpactDataSet;
class BGSMaterialType;

class BGSBlockBashData : public BaseFormComponent
{
public:
Expand Down
96 changes: 53 additions & 43 deletions CommonLibSF/include/RE/B/BSTOptional.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ namespace RE
}

// 2) trivial
constexpr BSTOptional(const BSTOptional&) requires(std::is_trivially_copy_constructible_v<value_type>) = default;
constexpr BSTOptional(const BSTOptional&)
requires(std::is_trivially_copy_constructible_v<value_type>)
= default;

// 2) trivial
constexpr BSTOptional(BSTOptional&&) requires(std::is_trivially_move_constructible_v<value_type>) = default;
constexpr BSTOptional(BSTOptional&&)
requires(std::is_trivially_move_constructible_v<value_type>)
= default;

// 3) non-trivial
constexpr BSTOptional(BSTOptional&& a_rhs) //
Expand All @@ -52,12 +56,12 @@ namespace RE
requires(std::is_constructible_v<value_type, const U&> &&
!std::is_constructible_v<value_type, BSTOptional<U>&> &&
!std::is_constructible_v<value_type, const BSTOptional<U>&> &&
!std::is_constructible_v<value_type, BSTOptional<U>&&> &&
!std::is_constructible_v<value_type, const BSTOptional<U>&&> &&
!std::is_constructible_v<value_type, BSTOptional<U> &&> &&
!std::is_constructible_v<value_type, const BSTOptional<U> &&> &&
!std::is_convertible_v<BSTOptional<U>&, value_type> &&
!std::is_convertible_v<const BSTOptional<U>&, value_type> &&
!std::is_convertible_v<BSTOptional<U>&&, value_type> &&
!std::is_convertible_v<const BSTOptional<U>&&, value_type>)
!std::is_convertible_v<BSTOptional<U> &&, value_type> &&
!std::is_convertible_v<const BSTOptional<U> &&, value_type>)
{
if (a_rhs.has_value()) {
std::construct_at(std::addressof(_value), a_rhs.value());
Expand All @@ -70,15 +74,15 @@ namespace RE
explicit(!std::is_convertible_v<U&&, T>) //
BSTOptional(BSTOptional<U>&& a_rhs) //
noexcept(std::is_nothrow_constructible_v<value_type, U&&>) //
requires(std::is_constructible_v<value_type, U&&> &&
requires(std::is_constructible_v<value_type, U &&> &&
!std::is_constructible_v<value_type, BSTOptional<U>&> &&
!std::is_constructible_v<value_type, const BSTOptional<U>&> &&
!std::is_constructible_v<value_type, BSTOptional<U>&&> &&
!std::is_constructible_v<value_type, const BSTOptional<U>&&> &&
!std::is_constructible_v<value_type, BSTOptional<U> &&> &&
!std::is_constructible_v<value_type, const BSTOptional<U> &&> &&
!std::is_convertible_v<BSTOptional<U>&, value_type> &&
!std::is_convertible_v<const BSTOptional<U>&, value_type> &&
!std::is_convertible_v<BSTOptional<U>&&, value_type> &&
!std::is_convertible_v<const BSTOptional<U>&&, value_type>)
!std::is_convertible_v<BSTOptional<U> &&, value_type> &&
!std::is_convertible_v<const BSTOptional<U> &&, value_type>)
{
if (a_rhs.has_value()) {
std::construct_at(std::addressof(_value), std::move(a_rhs).value());
Expand All @@ -90,7 +94,7 @@ namespace RE
template <class... Args>
constexpr explicit BSTOptional(std::in_place_t, Args&&... a_args) //
noexcept(std::is_nothrow_constructible_v<value_type, Args&&...>) //
requires(std::is_constructible_v<value_type, Args&&...>)
requires(std::is_constructible_v<value_type, Args && ...>)
{
std::construct_at(std::addressof(_value), std::forward<Args>(a_args)...);
_active = true;
Expand All @@ -100,7 +104,7 @@ namespace RE
template <class U, class... Args>
constexpr explicit BSTOptional(std::in_place_t, std::initializer_list<U> a_ilist, Args&&... a_args) //
noexcept(std::is_nothrow_constructible_v<value_type, std::initializer_list<U>&, Args&&...>) //
requires(std::is_constructible_v<value_type, std::initializer_list<U>&, Args&&...>)
requires(std::is_constructible_v<value_type, std::initializer_list<U>&, Args && ...>)
{
std::construct_at(std::addressof(_value), a_ilist, std::forward<Args>(a_args)...);
_active = true;
Expand All @@ -111,7 +115,7 @@ namespace RE
constexpr explicit(!std::is_convertible_v<U&&, value_type>) //
BSTOptional(U&& a_value) //
noexcept(std::is_nothrow_constructible_v<value_type, U&&>) //
requires(std::is_constructible_v<value_type, U&&> &&
requires(std::is_constructible_v<value_type, U &&> &&
!std::same_as<std::remove_cvref_t<U>, std::in_place_t> &&
!std::same_as<std::remove_cvref_t<U>, BSTOptional<value_type>>)
{
Expand All @@ -128,7 +132,9 @@ namespace RE
}

// trivial
~BSTOptional() requires(std::is_trivially_destructible_v<value_type>) = default;
~BSTOptional()
requires(std::is_trivially_destructible_v<value_type>)
= default;

// 1)
BSTOptional& operator=(std::nullopt_t) //
Expand Down Expand Up @@ -164,7 +170,8 @@ namespace RE
// 2) deleted
BSTOptional& operator=(const BSTOptional&) //
requires(!std::is_copy_constructible_v<value_type> ||
!std::is_copy_assignable_v<value_type>) = delete;
!std::is_copy_assignable_v<value_type>)
= delete;

// 3) defined
constexpr BSTOptional& operator=(BSTOptional&& a_rhs) //
Expand Down Expand Up @@ -192,7 +199,8 @@ namespace RE
// 3) deleted
BSTOptional& operator=(BSTOptional&&) //
requires(!std::is_move_constructible_v<value_type> ||
!std::is_move_assignable_v<value_type>) = delete;
!std::is_move_assignable_v<value_type>)
= delete;

// 4)
template <class U = value_type>
Expand All @@ -201,8 +209,8 @@ namespace RE
std::is_nothrow_constructible_v<value_type, U&&> &&
std::is_nothrow_assignable_v<value_type&, U&&>)) //
requires(!std::same_as<std::remove_cvref_t<U>, BSTOptional<value_type>> &&
std::is_constructible_v<value_type, U&&> &&
std::is_assignable_v<value_type&, U&&> &&
std::is_constructible_v<value_type, U &&> &&
std::is_assignable_v<value_type&, U &&> &&
(!std::is_scalar_v<value_type> || !std::same_as<std::decay_t<U>, T>))
{
if (has_value()) {
Expand All @@ -222,16 +230,16 @@ namespace RE
std::is_nothrow_assignable_v<value_type&, const U&>)) //
requires(!std::is_constructible_v<value_type, BSTOptional<U>&> &&
!std::is_constructible_v<value_type, const BSTOptional<U>&> &&
!std::is_constructible_v<value_type, BSTOptional<U>&&> &&
!std::is_constructible_v<value_type, const BSTOptional<U>&&> &&
!std::is_constructible_v<value_type, BSTOptional<U> &&> &&
!std::is_constructible_v<value_type, const BSTOptional<U> &&> &&
!std::is_convertible_v<BSTOptional<U>&, value_type> &&
!std::is_convertible_v<const BSTOptional<U>&, value_type> &&
!std::is_convertible_v<BSTOptional<U>&&, value_type> &&
!std::is_convertible_v<const BSTOptional<U>&&, value_type> &&
!std::is_convertible_v<BSTOptional<U> &&, value_type> &&
!std::is_convertible_v<const BSTOptional<U> &&, value_type> &&
!std::is_assignable_v<value_type&, BSTOptional<U>&> &&
!std::is_assignable_v<value_type&, const BSTOptional<U>&> &&
!std::is_assignable_v<value_type&, BSTOptional<U>&&> &&
!std::is_assignable_v<value_type&, const BSTOptional<U>&&> &&
!std::is_assignable_v<value_type&, BSTOptional<U> &&> &&
!std::is_assignable_v<value_type&, const BSTOptional<U> &&> &&
std::is_constructible_v<value_type, const U&> &&
std::is_assignable_v<value_type&, const U&>)
{
Expand All @@ -256,16 +264,16 @@ namespace RE
std::is_nothrow_assignable_v<value_type&, U>)) //
requires(!std::is_constructible_v<value_type, BSTOptional<U>&> &&
!std::is_constructible_v<value_type, const BSTOptional<U>&> &&
!std::is_constructible_v<value_type, BSTOptional<U>&&> &&
!std::is_constructible_v<value_type, const BSTOptional<U>&&> &&
!std::is_constructible_v<value_type, BSTOptional<U> &&> &&
!std::is_constructible_v<value_type, const BSTOptional<U> &&> &&
!std::is_convertible_v<BSTOptional<U>&, value_type> &&
!std::is_convertible_v<const BSTOptional<U>&, value_type> &&
!std::is_convertible_v<BSTOptional<U>&&, value_type> &&
!std::is_convertible_v<const BSTOptional<U>&&, value_type> &&
!std::is_convertible_v<BSTOptional<U> &&, value_type> &&
!std::is_convertible_v<const BSTOptional<U> &&, value_type> &&
!std::is_assignable_v<value_type&, BSTOptional<U>&> &&
!std::is_assignable_v<value_type&, const BSTOptional<U>&> &&
!std::is_assignable_v<value_type&, BSTOptional<U>&&> &&
!std::is_assignable_v<value_type&, const BSTOptional<U>&&> &&
!std::is_assignable_v<value_type&, BSTOptional<U> &&> &&
!std::is_assignable_v<value_type&, const BSTOptional<U> &&> &&
std::is_constructible_v<value_type, U> &&
std::is_assignable_v<value_type&, U>)
{
Expand All @@ -282,12 +290,12 @@ namespace RE
return *this;
}

[[nodiscard]] constexpr const value_type* operator->() const noexcept { return std::addressof(value()); }
[[nodiscard]] constexpr value_type* operator->() noexcept { return std::addressof(value()); }
[[nodiscard]] constexpr const value_type& operator*() const& noexcept { return value(); }
[[nodiscard]] constexpr value_type& operator*() & noexcept { return value(); }
[[nodiscard]] constexpr const value_type* operator->() const noexcept { return std::addressof(value()); }
[[nodiscard]] constexpr value_type* operator->() noexcept { return std::addressof(value()); }
[[nodiscard]] constexpr const value_type& operator*() const& noexcept { return value(); }
[[nodiscard]] constexpr value_type& operator*() & noexcept { return value(); }
[[nodiscard]] constexpr const value_type&& operator*() const&& noexcept { return std::move(*this).value(); }
[[nodiscard]] constexpr value_type&& operator*() && noexcept { return std::move(*this).value(); }
[[nodiscard]] constexpr value_type&& operator*() && noexcept { return std::move(*this).value(); }

[[nodiscard]] constexpr explicit operator bool() const noexcept { return has_value(); }
[[nodiscard]] constexpr bool has_value() const noexcept { return _active; }
Expand Down Expand Up @@ -329,18 +337,20 @@ namespace RE
template <class U>
[[nodiscard]] constexpr value_type value_or(U&& a_default) && //
requires((std::is_move_constructible_v<value_type> &&
std::convertible_to<U&&, value_type>))
std::convertible_to<U&&, value_type>)) {
return has_value() ? std::move(*this).value() : static_cast<T>(std::forward<U>(a_default));
}

void reset() noexcept(noexcept(do_reset()))
{
return has_value() ? std::move(*this).value() : static_cast<T>(std::forward<U>(a_default));
do_reset();
}

void reset() noexcept(noexcept(do_reset())) { do_reset(); }

// 1)
template <class... Args>
value_type& emplace(Args&&... a_args) //
noexcept(std::is_nothrow_constructible_v<value_type, Args&&...>) //
requires(std::is_constructible_v<value_type, Args&&...>)
requires(std::is_constructible_v<value_type, Args && ...>)
{
reset();
std::construct_at(std::addressof(_value), std::forward<Args>(a_args)...);
Expand All @@ -352,7 +362,7 @@ namespace RE
template <class U, class... Args>
value_type& emplace(std::initializer_list<U> a_ilist, Args&&... a_args) //
noexcept(std::is_nothrow_constructible_v<value_type, std::initializer_list<U>&, Args&&...>) //
requires(std::is_constructible_v<value_type, std::initializer_list<U>&, Args&&...>)
requires(std::is_constructible_v<value_type, std::initializer_list<U>&, Args && ...>)
{
reset();
std::construct_at(std::addressof(_value), a_ilist, std::forward<Args>(a_args)...);
Expand All @@ -375,7 +385,7 @@ namespace RE
union
{
std::remove_const_t<value_type> _value;
std::byte _buffer[sizeof(value_type)]{};
std::byte _buffer[sizeof(value_type)]{};
}; // 00
bool _active{ false }; // ??
};
Expand Down
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/IDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ namespace RE::ID
namespace TESObjectREFR
{
inline constexpr REL::ID ActivateRef{ 106374 };
inline constexpr REL::ID AddLockChange{ 106386 };
inline constexpr REL::ID AddLockChange{ 106386 };
inline constexpr REL::ID GetCalcLevel{ 107531 };
inline constexpr REL::ID GetCurrentLocation{ 106554 };
inline constexpr REL::ID GetLinkedRef{ 107578 };
Expand Down
5 changes: 5 additions & 0 deletions CommonLibSF/include/RE/Starfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "RE/B/BGSAttachParentArray.h"
#include "RE/B/BGSAttackDataForm.h"
#include "RE/B/BGSBipedObjectForm.h"
#include "RE/B/BGSBlockBashData.h"
#include "RE/B/BGSBodyPartInfo.h"
#include "RE/B/BGSCraftingResourceOwner.h"
#include "RE/B/BGSCraftingUseSound.h"
Expand All @@ -27,6 +28,7 @@
#include "RE/B/BGSFeaturedItemMessage.h"
#include "RE/B/BGSForcedLocRefType.h"
#include "RE/B/BGSFormFolderKeywordList.h"
#include "RE/B/BGSInstanceNamingRulesForm.h"
#include "RE/B/BGSInventoryInterface.h"
#include "RE/B/BGSInventoryItem.h"
#include "RE/B/BGSInventoryList.h"
Expand Down Expand Up @@ -76,6 +78,7 @@
#include "RE/B/BSTArray.h"
#include "RE/B/BSTEvent.h"
#include "RE/B/BSTList.h"
#include "RE/B/BSTOptional.h"
#include "RE/B/BSTSingleton.h"
#include "RE/B/BSTSmartPointer.h"
#include "RE/B/BSTTuple.h"
Expand Down Expand Up @@ -176,6 +179,7 @@
#include "RE/T/TESAIForm.h"
#include "RE/T/TESActorBase.h"
#include "RE/T/TESActorBaseData.h"
#include "RE/T/TESBipedModelForm.h"
#include "RE/T/TESBoundAnimObject.h"
#include "RE/T/TESBoundObject.h"
#include "RE/T/TESCamera.h"
Expand All @@ -186,6 +190,7 @@
#include "RE/T/TESDataHandler.h"
#include "RE/T/TESDeathEvent.h"
#include "RE/T/TESDescription.h"
#include "RE/T/TESEnchantableForm.h"
#include "RE/T/TESFile.h"
#include "RE/T/TESForm.h"
#include "RE/T/TESFormRefCount.h"
Expand Down
2 changes: 1 addition & 1 deletion CommonLibSF/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "commonlibsf",
"version-date": "2023-11-05",
"version-date": "2023-11-06",
"port-version": 0,
"description": "A collaborative reverse-engineered library for Starfield.",
"homepage": "https://github.com/Starfield-Reverse-Engineering/CommonLibSF",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![C++23](https://img.shields.io/static/v1?label=standard&message=c%2B%2B23&color=blue&logo=c%2B%2B&&logoColor=red&style=flat)](https://en.cppreference.com/w/cpp/compiler_support)
![Platform](https://img.shields.io/static/v1?label=platform&message=windows&color=dimgray&style=flat&logo=windows)
[![Game version](https://img.shields.io/badge/game%20version-1.7.36-orange)](#Developing-with-CommonLibSF)
[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-11-05&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg)
[![VCPKG_VER](https://img.shields.io/static/v1?label=vcpkg%20registry&message=2023-11-06&color=green&style=flat)](https://github.com/Starfield-Reverse-Engineering/Starfield-RE-vcpkg)
[![Main CI](https://img.shields.io/github/actions/workflow/status/Starfield-Reverse-Engineering/CommonLibSF/main_ci.yml)](https://github.com/Starfield-Reverse-Engineering/CommonLibSF/actions/workflows/main_ci.yml)

## Build Dependencies
Expand Down

0 comments on commit 16890e5

Please sign in to comment.