mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-03 19:56:07 +00:00
CResource: Make StaticType() constexpr
These only return enum values, so this can be trivially made constexpr
This commit is contained in:
parent
84e0d177d8
commit
bc05e9bd4b
@ -16,7 +16,7 @@
|
|||||||
// Must be included on every CResource subclass.
|
// Must be included on every CResource subclass.
|
||||||
#define DECLARE_RESOURCE_TYPE(ResourceTypeEnum) \
|
#define DECLARE_RESOURCE_TYPE(ResourceTypeEnum) \
|
||||||
public: \
|
public: \
|
||||||
static EResourceType StaticType() \
|
static constexpr EResourceType StaticType() \
|
||||||
{ \
|
{ \
|
||||||
return EResourceType::ResourceTypeEnum; \
|
return EResourceType::ResourceTypeEnum; \
|
||||||
} \
|
} \
|
||||||
|
@ -32,7 +32,7 @@ public:
|
|||||||
void InitFromArchetype(IProperty* pOther) override;
|
void InitFromArchetype(IProperty* pOther) override;
|
||||||
bool ShouldSerialize() const override;
|
bool ShouldSerialize() const override;
|
||||||
|
|
||||||
static EPropertyType StaticType() { return EPropertyType::Struct; }
|
static constexpr EPropertyType StaticType() { return EPropertyType::Struct; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -361,7 +361,7 @@ public:
|
|||||||
mDefaultValue = kInDefaultValue;
|
mDefaultValue = kInDefaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static EPropertyType StaticType() { return PropEnum; }
|
static constexpr EPropertyType StaticType() { return PropEnum; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename PropType, EPropertyType PropEnum>
|
template<typename PropType, EPropertyType PropEnum>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user