write shit

This commit is contained in:
2023-09-20 10:49:32 +08:00
parent 69f702a6d2
commit d66716acd7
14 changed files with 178 additions and 348 deletions

View File

@ -144,10 +144,13 @@ namespace LibCmo::XContainer {
}
namespace NSXObjectPointerArray {
void AddIfNotHere(XObjectPointerArray& objarray, CK2::ObjImpls::CKObject* const obj) {
bool AddIfNotHere(XObjectPointerArray& objarray, CK2::ObjImpls::CKObject* const obj) {
auto finder = std::find(objarray.begin(), objarray.end(), obj);
if (finder == objarray.end()) {
objarray.emplace_back(obj);
return true;
} else {
return false;
}
}