File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
loader/include/Geode/modify Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
3
+ #include " ../utils/MiniFunction.hpp"
3
4
#include " Traits.hpp"
4
5
5
6
#include < Geode/loader/Loader.hpp>
6
- #include " ../utils/MiniFunction.hpp"
7
7
#include < cocos2d.h>
8
8
#include < vector>
9
9
@@ -49,16 +49,15 @@ namespace geode::modifier {
49
49
}
50
50
};
51
51
52
- [[deprecated(" Will be removed in 1.0.0" )]]
53
- GEODE_DLL size_t getFieldIndexForClass (size_t hash);
52
+ [[deprecated(" Will be removed in 1.0.0" )]] GEODE_DLL size_t getFieldIndexForClass (size_t hash);
54
53
GEODE_DLL size_t getFieldIndexForClass (char const * name);
55
54
56
55
template <class Parent , class Base >
57
56
class FieldIntermediate {
58
57
using Intermediate = Modify<Parent, Base>;
59
58
// Padding used for guaranteeing any member of parents
60
59
// will be in between sizeof(Intermediate) and sizeof(Parent)
61
- alignas (Base) uintptr_t m_padding;
60
+ alignas (std::max( alignof ( Base), alignof ( uintptr_t )) ) uintptr_t m_padding;
62
61
63
62
public:
64
63
// the constructor that constructs the fields.
@@ -120,7 +119,7 @@ namespace geode::modifier {
120
119
reinterpret_cast <std::byte*>(offsetField) - sizeof (Intermediate)
121
120
);
122
121
}
123
-
122
+
124
123
Parent* self () {
125
124
return this ->operator Parent*();
126
125
}
You can’t perform that action at this time.
0 commit comments