Small Tweak
All checks were successful
CI / Build (push) Successful in 15s

This commit is contained in:
TheBrokenRail 2025-03-31 00:42:13 -04:00
parent 818b7535eb
commit fd720d2321
4 changed files with 6 additions and 5 deletions

View File

@ -11,4 +11,6 @@
template <typename T>
static constexpr decltype(sizeof(T)) __real_sizeof() {
return sizeof(std::conditional_t<std::is_reference_v<T>, void *, T>);
}
}
template <typename T>
using __make_reference = T &;

View File

@ -64,7 +64,6 @@ public:
#undef super
// Disable Warnings
#pragma GCC diagnostic ignored "-Wparentheses"
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
{{ main }}

View File

@ -35,7 +35,6 @@ typedef unsigned int uint;
// Warnings
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Wparentheses"
{{ main }}

View File

@ -1,4 +1,4 @@
import { extractArrayInfo, formatType } from './common';
import { extractArrayInfo, formatType, INTERNAL } from './common';
// A Single Property
export class Property {
@ -41,10 +41,11 @@ export class Property {
}
}
// A Single Static Property
export class StaticProperty extends Property {
// Reference
referenceDefinition(addSelf: boolean) {
const parts = this.parts();
return `${parts.type}(&${addSelf ? this.prettyName() : this.name()})${parts.arrayInfo}`;
return `${INTERNAL}make_reference<${parts.type.trim()}${parts.arrayInfo}> ${addSelf ? this.prettyName() : this.name()}`;
}
}