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() {
|
int main() {
|
||||||
std::unique_ptr<SpaceObject> asteroid = std::make_unique<Asteroid>();
|
auto asteroid = std::make_unique<Asteroid>();
|
||||||
std::unique_ptr<SpaceObject> spaceship = std::make_unique<Spaceship>();
|
auto spaceship = std::make_unique<Spaceship>();
|
||||||
|
|
||||||
collide(*asteroid, *spaceship);
|
collide(*asteroid, *spaceship);
|
||||||
// Calls in order:
|
// Calls in order:
|
||||||
|
|
Loading…
Reference in a new issue