fixup! WIP: posts: add mutiple-dispatch-in-c++
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
70f99f21fa
commit
30ffd90b2a
|
@ -161,8 +161,8 @@ void collide(SpaceObject& first, SpaceObject& second) {
|
|||
};
|
||||
|
||||
int main() {
|
||||
std::unique_ptr<SpaceObject> asteroid = std::make_unique<Asteroid>();
|
||||
std::unique_ptr<SpaceObject> spaceship = std::make_unique<Spaceship>();
|
||||
auto asteroid = std::make_unique<Asteroid>();
|
||||
auto spaceship = std::make_unique<Spaceship>();
|
||||
|
||||
collide(*asteroid, *spaceship);
|
||||
// Calls in order:
|
||||
|
|
Loading…
Reference in a new issue