format: reformat project

Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
Vyacheslav Ivanov 2024-08-03 19:53:48 +03:00 • committed by Pugemon
parent 736cd175d5
commit bbf33e8e4d
No known key found for this signature in database
GPG key ID: 472FA343B3CC3287
202 changed files with 7389 additions and 5609 deletions

View file

@ -40,15 +40,13 @@ void Inventories::remove(int64_t id) {
std::shared_ptr<Inventory> Inventories::get(int64_t id) {
auto found = map.find(id);
if (found == map.end())
return nullptr;
if (found == map.end()) return nullptr;
return found->second;
}
std::shared_ptr<Inventory> Inventories::clone(int64_t id) {
auto original = get(id);
if (original == nullptr)
return nullptr;
if (original == nullptr) return nullptr;
auto clone = std::make_shared<Inventory>(*original);
clone->setId(level.getWorld()->getNextInventoryId());
store(clone);