diff --git a/src/UESaveFile/Types/ArrayProperty.h b/src/UESaveFile/Types/ArrayProperty.h index b01a9ba..f453720 100644 --- a/src/UESaveFile/Types/ArrayProperty.h +++ b/src/UESaveFile/Types/ArrayProperty.h @@ -27,12 +27,14 @@ struct ArrayProperty : public UnrealPropertyBase { propertyType = "ArrayProperty"; } - auto at(std::size_t index) -> UnrealPropertyBase* { + template + std::enable_if_t::value, T*> + at(std::size_t index) { if(index >= items.size()) { return nullptr; } - return items[index].get(); + return static_cast(items[index].get()); } std::string itemType;