Skip to content

Commit 9debf70

Browse files
ci: maintenance
1 parent fd25015 commit 9debf70

File tree

8 files changed

+71
-71
lines changed

8 files changed

+71
-71
lines changed

include/RE/B/BSScriptUtil.h

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#pragma once
22

33
#include "RE/B/BSFixedString.h"
4-
#include "RE/B/BSTSmartPointer.h"
5-
#include "RE/I/IVirtualMachine.h"
6-
#include "RE/V/VirtualMachine.h"
74
#include "RE/B/BSTScatterTable.h"
8-
#include "RE/T/TESForm.h"
5+
#include "RE/B/BSTSmartPointer.h"
96
#include "RE/G/GameVM.h"
10-
#include "SFSE/Logger.h"
11-
#include "SFSE/SFSE.h"
12-
#include "RE/O/ObjectTypeInfo.h"
7+
#include "RE/I/IVirtualMachine.h"
8+
#include "RE/N/NativeFunctionBase.h"
139
#include "RE/O/Object.h"
10+
#include "RE/O/ObjectTypeInfo.h"
1411
#include "RE/S/StackFrame.h"
1512
#include "RE/S/Struct.h"
16-
#include "RE/N/NativeFunctionBase.h"
13+
#include "RE/T/TESForm.h"
14+
#include "RE/V/VirtualMachine.h"
15+
#include "SFSE/Logger.h"
16+
#include "SFSE/SFSE.h"
1717

1818
namespace RE::BSScript
1919
{
@@ -83,7 +83,7 @@ namespace RE::BSScript
8383
{
8484
if (_proxy && _proxy->type) {
8585
const auto& mappings = _proxy->type->varNameIndexMap;
86-
const auto it = mappings.find(a_name);
86+
const auto it = mappings.find(a_name);
8787
if (it != mappings.end()) {
8888
const auto& var = _proxy->variables[it->Value];
8989
return detail::UnpackVariable<T>(var);
@@ -104,7 +104,7 @@ namespace RE::BSScript
104104
bool insert(std::string_view a_name, T&& a_val)
105105
{
106106
if (_proxy && _proxy->type) {
107-
auto& mappings = _proxy->type->varNameIndexMap;
107+
auto& mappings = _proxy->type->varNameIndexMap;
108108
const auto it = mappings.find(a_name);
109109
if (it != mappings.end()) {
110110
auto& var = _proxy->variables[it->Value];
@@ -303,13 +303,12 @@ namespace RE::BSScript
303303
std::true_type> &&
304304
std::is_default_constructible_v<T> &&
305305
((array<typename T::value_type> || wrapper<typename T::value_type>)) && //
306-
requires(T a_nullable)
307-
{
308-
// clang-format off
306+
requires(T a_nullable) {
307+
// clang-format off
309308
static_cast<bool>(a_nullable);
310309
{ *static_cast<T&&>(a_nullable) } -> decays_to<typename T::value_type>;
311-
// clang-format on
312-
};
310+
// clang-format on
311+
};
313312

314313
template <class T>
315314
concept valid_self =
@@ -377,8 +376,8 @@ namespace RE::BSScript
377376
template <detail::object T>
378377
[[nodiscard]] std::optional<TypeInfo> GetTypeInfo()
379378
{
380-
const auto game = GameVM::GetSingleton();
381-
const auto vm = game ? game->GetVM() : nullptr;
379+
const auto game = GameVM::GetSingleton();
380+
const auto vm = game ? game->GetVM() : nullptr;
382381
BSTSmartPointer<ObjectTypeInfo> typeInfo;
383382
if (!vm ||
384383
!vm->GetScriptObjectType(GetVMTypeID<T>(), typeInfo) ||
@@ -394,10 +393,10 @@ namespace RE::BSScript
394393
template <detail::vmobject T>
395394
[[nodiscard]] std::optional<TypeInfo> GetTypeInfo()
396395
{
397-
const auto game = GameVM::GetSingleton();
398-
const auto vm = game ? game->GetVM() : nullptr;
396+
const auto game = GameVM::GetSingleton();
397+
const auto vm = game ? game->GetVM() : nullptr;
399398
REL::Relocation<RE::BSFixedString*> baseObjectName{ REL::ID(648543) };
400-
BSTSmartPointer<ObjectTypeInfo> typeInfo;
399+
BSTSmartPointer<ObjectTypeInfo> typeInfo;
401400
if (!vm ||
402401
!vm->GetScriptObjectType(*baseObjectName, typeInfo) ||
403402
!typeInfo) {
@@ -498,8 +497,8 @@ namespace RE::BSScript
498497
}
499498

500499
const auto success = [&]() {
501-
const auto game = GameVM::GetSingleton();
502-
const auto vm = game ? game->GetVM() : nullptr;
500+
const auto game = GameVM::GetSingleton();
501+
const auto vm = game ? game->GetVM() : nullptr;
503502
BSTSmartPointer<ObjectTypeInfo> typeInfo;
504503
if (!vm ||
505504
!vm->GetScriptObjectType(GetVMTypeID<T>(), typeInfo) ||
@@ -508,10 +507,10 @@ namespace RE::BSScript
508507
}
509508

510509
const auto& handles = vm->GetObjectHandlePolicy();
511-
const auto handle = handles.GetHandleForObject(
512-
GetVMTypeID<T>(),
513-
const_cast<const void*>(
514-
static_cast<const volatile void*>(a_val)));
510+
const auto handle = handles.GetHandleForObject(
511+
GetVMTypeID<T>(),
512+
const_cast<const void*>(
513+
static_cast<const volatile void*>(a_val)));
515514
if (handle == handles.EmptyHandle()) {
516515
return false;
517516
}
@@ -594,10 +593,10 @@ namespace RE::BSScript
594593
typename std::remove_cvref_t<T>::value_type&&>;
595594

596595
const auto success = [&]() {
597-
const auto game = GameVM::GetSingleton();
598-
const auto vm = game ? game->GetVM() : nullptr;
599-
const auto typeInfo = GetTypeInfo<std::remove_cvref_t<T>>();
600-
const auto size = a_val.size();
596+
const auto game = GameVM::GetSingleton();
597+
const auto vm = game ? game->GetVM() : nullptr;
598+
const auto typeInfo = GetTypeInfo<std::remove_cvref_t<T>>();
599+
const auto size = a_val.size();
601600
BSTSmartPointer<Array> out;
602601
if (!typeInfo ||
603602
!vm ||
@@ -643,7 +642,7 @@ namespace RE::BSScript
643642
namespace detail
644643
{
645644
template <class T>
646-
__forceinline void PackVariable(Variable & a_var, T && a_val)
645+
__forceinline void PackVariable(Variable& a_var, T&& a_val)
647646
{
648647
BSScript::PackVariable(a_var, std::forward<T>(a_val));
649648
}
@@ -677,7 +676,7 @@ namespace RE::BSScript
677676
}
678677

679678
const auto& handles = vm->GetObjectHandlePolicy();
680-
const auto handle = object->GetHandle();
679+
const auto handle = object->GetHandle();
681680
if (!handles.IsHandleLoaded(handle)) {
682681
return nullptr;
683682
}
@@ -776,7 +775,7 @@ namespace RE::BSScript
776775

777776
using value_type = typename T::value_type;
778777

779-
T out;
778+
T out;
780779
const auto in = get<Array>(a_var);
781780
for (const auto& var : in->elements) {
782781
out.push_back(detail::UnpackVariable<value_type>(var));
@@ -905,12 +904,12 @@ namespace RE::BSScript
905904
class F,
906905
std::size_t... I>
907906
decltype(auto) DispatchHelper(
908-
Variable& a_self,
907+
Variable& a_self,
909908
Internal::VirtualMachine& a_vm,
910-
std::uint32_t a_stackID,
911-
const StackFrame& a_stackFrame,
912-
Stack& a_stack,
913-
const std::function<F>& a_callback,
909+
std::uint32_t a_stackID,
910+
const StackFrame& a_stackFrame,
911+
Stack& a_stack,
912+
const std::function<F>& a_callback,
914913
std::index_sequence<I...>)
915914
{
916915
const auto self = [&]() -> S {
@@ -986,7 +985,8 @@ namespace RE::BSScript
986985
template <class Fn>
987986
NativeFunction(std::string_view a_object, std::string_view a_function, Fn a_func, bool a_isLatent) //
988987
requires(detail::invocable_r<Fn, R, S, Args...> ||
989-
detail::invocable_r<Fn, R, IVirtualMachine&, std::uint32_t, S, Args...>) :
988+
detail::invocable_r<Fn, R, IVirtualMachine&, std::uint32_t, S, Args...>)
989+
:
990990
super(a_object, a_function, sizeof...(Args), detail::static_tag<S>, a_isLatent),
991991
_stub(std::move(a_func))
992992
{
@@ -1060,11 +1060,11 @@ namespace RE::BSScript
10601060

10611061
template <class F>
10621062
void IVirtualMachine::BindNativeMethod(
1063-
stl::zstring a_object,
1064-
stl::zstring a_function,
1065-
F a_func,
1063+
stl::zstring a_object,
1064+
stl::zstring a_function,
1065+
F a_func,
10661066
std::optional<bool> a_taskletCallable,
1067-
bool a_isLatent)
1067+
bool a_isLatent)
10681068
{
10691069
NF_util::NativeFunctionBase* func = new NativeFunction(
10701070
a_object,

include/RE/I/IFunction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
#include "RE/B/BSFixedString.h"
44
#include "RE/B/BSIntrusiveRefCounted.h"
5-
#include "RE/T/TypeInfo.h"
6-
#include "RE/S/StackFrame.h"
75
#include "RE/E/ErrorLogger.h"
6+
#include "RE/S/StackFrame.h"
7+
#include "RE/T/TypeInfo.h"
88

99
namespace RE::BSScript
1010
{

include/RE/I/IStackCallbackSaveInterface.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

3-
#include "RE/B/BSTSmartPointer.h"
43
#include "RE/B/BSIntrusiveRefCounted.h"
4+
#include "RE/B/BSTSmartPointer.h"
55

66
namespace RE
77
{
@@ -18,12 +18,12 @@ namespace RE
1818
virtual ~IStackCallbackFunctor(){}; // 00
1919

2020
// add
21-
virtual void CallQueued() = 0; // 01
22-
virtual void CallCanceled() = 0; // 02
23-
virtual void StartMultiDispatch() = 0; // 03
24-
virtual void EndMultiDispatch() = 0; // 04
25-
virtual void operator()(Variable) = 0; // 05
26-
virtual bool CanSave() { return false; }; // 06
21+
virtual void CallQueued() = 0; // 01
22+
virtual void CallCanceled() = 0; // 02
23+
virtual void StartMultiDispatch() = 0; // 03
24+
virtual void EndMultiDispatch() = 0; // 04
25+
virtual void operator()(Variable) = 0; // 05
26+
virtual bool CanSave() { return false; }; // 06
2727
};
2828
static_assert(sizeof(IStackCallbackFunctor) == 0x10);
2929

include/RE/I/IVirtualMachine.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ namespace RE
135135

136136
template <class F>
137137
void BindNativeMethod(
138-
stl::zstring a_object,
139-
stl::zstring a_function,
140-
F a_func,
138+
stl::zstring a_object,
139+
stl::zstring a_function,
140+
F a_func,
141141
std::optional<bool> a_taskletCallable,
142-
bool a_isLatent);
142+
bool a_isLatent);
143143

144144
void PostError(std::string_view a_msg, std::uint32_t a_stackID, ErrorLogger::Severity a_severity)
145145
{

include/RE/N/NativeFunctionBase.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#pragma once
22

3+
#include "RE/B/BSTTuple.h"
34
#include "RE/I/IFunction.h"
45
#include "RE/T/TypeInfo.h"
5-
#include "RE/B/BSTTuple.h"
66

77
namespace RE::BSScript
88
{
@@ -49,9 +49,9 @@ namespace RE::BSScript
4949
NativeFunctionBase(
5050
std::string_view a_object,
5151
std::string_view a_function,
52-
std::uint16_t a_paramCount,
53-
bool a_isStatic,
54-
bool a_isLatent) :
52+
std::uint16_t a_paramCount,
53+
bool a_isStatic,
54+
bool a_isLatent) :
5555
_name(a_function),
5656
_className(a_object),
5757
_params(a_paramCount, 0),
@@ -74,7 +74,7 @@ namespace RE::BSScript
7474
return a_dst;
7575
}
7676

77-
virtual std::uint64_t GetParamCount() override { return _params.paramCount; }
77+
virtual std::uint64_t GetParamCount() override { return _params.paramCount; }
7878

7979
virtual TypeInfo* GetParam(std::uint32_t a_idx, BSFixedString* a_nameOut, TypeInfo* a_typeOut) override
8080
{

include/RE/N/NiAVObject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
#include "RE/B/BSFixedString.h"
3-
#include "RE/N/NiTransform.h"
43
#include "RE/N/NiBound.h"
4+
#include "RE/N/NiTransform.h"
55

66
namespace RE
77
{
@@ -130,7 +130,7 @@ namespace RE
130130
{
131131
_InterlockedExchangeAdd(&refcount, 1);
132132
}
133-
133+
134134
void DecRefCount()
135135
{
136136
if (_InterlockedExchangeAdd(&refcount, -1) == 1)

include/RE/S/StructTypeInfo.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
#include "RE/B/BSFixedString.h"
44
#include "RE/B/BSTArray.h"
5+
#include "RE/B/BSTScatterTable.h"
56
#include "RE/B/BSTSmartPointer.h"
67
#include "RE/I/IComplexType.h"
78
#include "RE/O/ObjectTypeInfo.h"
89
#include "RE/T/TypeInfo.h"
910
#include "RE/V/Variable.h"
10-
#include "RE/B/BSTScatterTable.h"
1111

1212
namespace RE::BSScript
1313
{
@@ -52,11 +52,11 @@ namespace RE::BSScript
5252
virtual TypeInfo::RawType GetRawType() const override { return TypeInfo::RawType::kStruct; } // 01
5353

5454
// members
55-
BSFixedString name; // 10
56-
BSTSmartPointer<ObjectTypeInfo> containingObjTypeInfo; // 18
57-
BSTArray<StructVar> variables; // 20
58-
BSTHashMap<BSFixedString, std::uint32_t> varNameIndexMap; // 30
59-
stl::enumeration<LinkValidState, std::int32_t> linkedValid; // 68
55+
BSFixedString name; // 10
56+
BSTSmartPointer<ObjectTypeInfo> containingObjTypeInfo; // 18
57+
BSTArray<StructVar> variables; // 20
58+
BSTHashMap<BSFixedString, std::uint32_t> varNameIndexMap; // 30
59+
stl::enumeration<LinkValidState, std::int32_t> linkedValid; // 68
6060
};
6161
static_assert(sizeof(StructTypeInfo) == 0x70);
6262
}

src/SFSE/API.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ namespace SFSE
164164
if (!allocated) {
165165
trampoline.create(hookSize);
166166
}
167-
167+
168168
// Call to GameVM::BindEverythingToScript(IVirtualMachine**) from GameVM::GameVM()
169169
REL::Relocation<uintptr_t> hookLoc{ REL::ID(169912), 0x514 };
170170
func = reinterpret_cast<call_t>(trampoline.write_call<5>(hookLoc.address(), &thunk));
171171
}
172-
172+
173173
static void thunk(RE::BSScript::IVirtualMachine** a_vm)
174174
{
175175
func(a_vm);

0 commit comments

Comments
 (0)