X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5dac84d65eed08644367fe040c41df162c02e5fa..17ac6c61bd407825851b824adbfa28d64fb69587:/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp diff --git a/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp b/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp index d6099d77aa..a252b82c5b 100644 --- a/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp +++ b/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -46,11 +46,11 @@ int main(int argc, char* argv[]) sg4::Engine e(&argc, argv); e.load_platform(argv[1]); - sg4::Mailbox* mb1 = sg4::Mailbox::by_name("Mailbox 1"); - sg4::Mailbox* mb2 = sg4::Mailbox::by_name("Mailbox 2"); + sg4::Mailbox* mb1 = e.mailbox_by_name_or_create("Mailbox 1"); + sg4::Mailbox* mb2 = e.mailbox_by_name_or_create("Mailbox 2"); - sg4::Actor::create("pinger", sg4::Host::by_name("Tremblay"), pinger, mb1, mb2); - sg4::Actor::create("ponger", sg4::Host::by_name("Jupiter"), ponger, mb2, mb1); + sg4::Actor::create("pinger", e.host_by_name("Tremblay"), pinger, mb1, mb2); + sg4::Actor::create("ponger", e.host_by_name("Jupiter"), ponger, mb2, mb1); e.run();