CResource: Make StaticType() constexpr

These only return enum values, so this can be trivially made constexpr
This commit is contained in:
Lioncash 2020-06-18 07:35:06 -04:00
parent 84e0d177d8
commit bc05e9bd4b
3 changed files with 3 additions and 3 deletions

View File

@ -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; \
} \

View File

@ -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

View File

@ -361,7 +361,7 @@ public:
mDefaultValue = kInDefaultValue;
}
static EPropertyType StaticType() { return PropEnum; }
static constexpr EPropertyType StaticType() { return PropEnum; }
};
template<typename PropType, EPropertyType PropEnum>