mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-03 03:36:10 +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.
|
||||
#define DECLARE_RESOURCE_TYPE(ResourceTypeEnum) \
|
||||
public: \
|
||||
static EResourceType StaticType() \
|
||||
static constexpr EResourceType StaticType() \
|
||||
{ \
|
||||
return EResourceType::ResourceTypeEnum; \
|
||||
} \
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
void InitFromArchetype(IProperty* pOther) override;
|
||||
bool ShouldSerialize() const override;
|
||||
|
||||
static EPropertyType StaticType() { return EPropertyType::Struct; }
|
||||
static constexpr EPropertyType StaticType() { return EPropertyType::Struct; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -361,7 +361,7 @@ public:
|
||||
mDefaultValue = kInDefaultValue;
|
||||
}
|
||||
|
||||
static EPropertyType StaticType() { return PropEnum; }
|
||||
static constexpr EPropertyType StaticType() { return PropEnum; }
|
||||
};
|
||||
|
||||
template<typename PropType, EPropertyType PropEnum>
|
||||
|
Loading…
x
Reference in New Issue
Block a user