Skip to content

Commit 5f465cc

Browse files
committed
linting fixups
1 parent 9faca9e commit 5f465cc

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/unrealsdk/unreal/classes/uobject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void UObject::post_edit_change_chain_property(UProperty* prop,
119119

120120
void UObject::post_edit_change_chain_property(UProperty* prop,
121121
std::initializer_list<UProperty*> chain) const {
122-
std::vector<UProperty*> vector_chain{chain};
122+
const std::vector<UProperty*> vector_chain{chain};
123123
this->post_edit_change_chain_property(prop, vector_chain);
124124
}
125125

src/unrealsdk/unreal/classes/uobject.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,19 @@ class UObject {
8181
template <typename R, typename... Args>
8282
R call_virtual_function(size_t index, Args... args) const {
8383
#ifdef ARCH_X86
84-
// NOLINTNEXTLINE(modernize-use-using)
84+
#if defined(__MINGW32__)
85+
#pragma GCC diagnostic push
86+
#pragma GCC diagnostic ignored "-Wattributes" // thiscall on non-class
87+
#endif
88+
// NOLINTNEXTLINE(modernize-use-using) - need a typedef for the __thiscall
8589
typedef R(__thiscall * func_ptr)(const UObject*, Args...);
90+
#if defined(__MINGW32__)
91+
#pragma GCC diagnostic pop
92+
#endif
8693
#else
8794
using func_ptr = R (*)(const UObject*, Args...);
8895
#endif
96+
8997
return reinterpret_cast<func_ptr>(this->vftable[index])(this, args...);
9098
}
9199

src/unrealsdk/unreal/structs/fpropertychangeevent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ FEditPropertyChain::FEditPropertyChain(const std::vector<UProperty*>& chain)
2323
idx++;
2424
}
2525

26-
if (chain.size() > 0) {
26+
if (!chain.empty()) {
2727
this->head = &this->nodes.front();
2828
this->tail = &this->nodes.back();
2929
}

0 commit comments

Comments
 (0)