Small Tweak
This commit is contained in:
parent
818b7535eb
commit
fd720d2321
@ -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 &;
|
@ -64,7 +64,6 @@ public:
|
||||
#undef super
|
||||
|
||||
// Disable Warnings
|
||||
#pragma GCC diagnostic ignored "-Wparentheses"
|
||||
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
|
||||
|
||||
{{ main }}
|
@ -35,7 +35,6 @@ typedef unsigned int uint;
|
||||
// Warnings
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#pragma GCC diagnostic ignored "-Wparentheses"
|
||||
|
||||
{{ main }}
|
||||
|
||||
|
@ -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()}`;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user