Build viewer/editor #13

Manually merged
williamjcm merged 128 commits from mass-viewer into master 2022-03-02 14:50:10 +01:00
1 changed files with 4 additions and 2 deletions
Showing only changes of commit 79e3193309 - Show all commits

View File

@ -27,12 +27,14 @@ struct ArrayProperty : public UnrealPropertyBase {
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()) {
return nullptr;
}
return items[index].get();
return static_cast<T*>(items[index].get());
}
std::string itemType;