Generic object is good for now

This commit is contained in:
Pcornat 2024-10-30 10:55:52 +01:00
parent 71e5faf139
commit 8429e7ff8f
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD
2 changed files with 22 additions and 13 deletions

View file

@ -160,11 +160,11 @@ namespace character {
}
}
billyObjects new_object(const billyEnums &inputObject) {
billyObjects new_object(const billyEnums &inputObject) noexcept {
return std::visit(overloaded{
[](const weapons input) { return billyObjects{ Weapons{ input }}; },
[](const equipments input) { return billyObjects{ Equipments{ input }}; },
[](const tools input) { return billyObjects{ Tools{ input }}; }
[](const weapons input) { return billyObjects{ new Weapons{ input }}; },
[](const equipments input) { return billyObjects{ new Equipments{ input }}; },
[](const tools input) { return billyObjects{ new Tools{ input }}; }
}, inputObject);
}
}