UESaveFile: add API to append a property.
This commit is contained in:
parent
0006c90a21
commit
9c1aeb753e
2 changed files with 8 additions and 0 deletions
|
@ -47,6 +47,12 @@ auto UESaveFile::reloadData() -> bool {
|
||||||
return valid();
|
return valid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UESaveFile::appendProperty(UnrealPropertyBase::ptr prop) {
|
||||||
|
auto none_prop = std::move(_properties.back());
|
||||||
|
_properties.back() = std::move(prop);
|
||||||
|
arrayAppend(_properties, std::move(none_prop));
|
||||||
|
}
|
||||||
|
|
||||||
auto UESaveFile::props() -> Containers::ArrayView<UnrealPropertyBase::ptr> {
|
auto UESaveFile::props() -> Containers::ArrayView<UnrealPropertyBase::ptr> {
|
||||||
return _properties;
|
return _properties;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,8 @@ class UESaveFile {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void appendProperty(UnrealPropertyBase::ptr prop);
|
||||||
|
|
||||||
auto props() -> Containers::ArrayView<UnrealPropertyBase::ptr>;
|
auto props() -> Containers::ArrayView<UnrealPropertyBase::ptr>;
|
||||||
|
|
||||||
auto saveToFile() -> bool;
|
auto saveToFile() -> bool;
|
||||||
|
|
Loading…
Reference in a new issue