This commit is contained in:
parent
5a82cf22e7
commit
ebee33733b
@ -14,3 +14,5 @@ static constexpr decltype(sizeof(T)) __real_sizeof() {
|
|||||||
}
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using __make_reference = T &;
|
using __make_reference = T &;
|
||||||
|
template <typename T>
|
||||||
|
using __make_pointer = T *;
|
@ -43,9 +43,12 @@ export class Property {
|
|||||||
|
|
||||||
// A Single Static Property
|
// A Single Static Property
|
||||||
export class StaticProperty extends Property {
|
export class StaticProperty extends Property {
|
||||||
|
type(pointer: boolean) {
|
||||||
|
const parts = this.parts();
|
||||||
|
return `${INTERNAL}make_${pointer ? 'pointer' : 'reference'}<${parts.type.trim()}${parts.arrayInfo}>`;
|
||||||
|
}
|
||||||
// Reference
|
// Reference
|
||||||
referenceDefinition(addSelf: boolean) {
|
referenceDefinition(addSelf: boolean) {
|
||||||
const parts = this.parts();
|
return `${this.type(false)} ${addSelf ? this.prettyName() : this.name()}`;
|
||||||
return `${INTERNAL}make_reference<${parts.type.trim()}${parts.arrayInfo}> ${addSelf ? this.prettyName() : this.name()}`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -275,7 +275,7 @@ export class Struct {
|
|||||||
|
|
||||||
// Static Properties
|
// Static Properties
|
||||||
for (const property of this.#staticProperties) {
|
for (const property of this.#staticProperties) {
|
||||||
out += `${property.referenceDefinition(true)} = *(std::remove_reference_t<decltype(${property.prettyName()})> *) ${toHex(property.offset)};\n`;
|
out += `${property.referenceDefinition(true)} = *(${property.type(true)}) ${toHex(property.offset)};\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
|
Loading…
x
Reference in New Issue
Block a user