Creating easily objects
This commit is contained in:
parent
f7862f09f9
commit
0b2467475a
2 changed files with 3 additions and 22 deletions
|
@ -165,12 +165,4 @@ namespace character {
|
|||
return sackOfGrain;
|
||||
}
|
||||
}
|
||||
|
||||
billyObjects new_object(const billyEnums &inputObject) noexcept {
|
||||
return std::visit(overloaded{
|
||||
[](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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue