Build viewer/editor #13

Manually merged
williamjcm merged 128 commits from mass-viewer into master 2022-03-02 14:50:10 +01:00
Showing only changes of commit 79e3193309 - Show all commits

View file

@ -27,12 +27,14 @@ struct ArrayProperty : public UnrealPropertyBase {
propertyType = "ArrayProperty"; propertyType = "ArrayProperty";
} }
auto at(std::size_t index) -> UnrealPropertyBase* { template<typename T>
std::enable_if_t<std::is_base_of<UnrealPropertyBase, T>::value, T*>
at(std::size_t index) {
if(index >= items.size()) { if(index >= items.size()) {
return nullptr; return nullptr;
} }
return items[index].get(); return static_cast<T*>(items[index].get());
} }
std::string itemType; std::string itemType;