X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ea74f5d95928a521a588737e81f1de94eef25d19..e92731a85139d9ebe033deb0827a8a4deaf3651e:/src/mc/udpor_global.cpp diff --git a/src/mc/udpor_global.cpp b/src/mc/udpor_global.cpp index 8241c229a5..1177ff30c1 100644 --- a/src/mc/udpor_global.cpp +++ b/src/mc/udpor_global.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2008-2023. 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. */ @@ -9,27 +9,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_udpor_global, mc, "udpor_global"); -namespace simgrid { -namespace mc { +namespace simgrid::mc::udpor { -EventSet EvtSetTools::makeUnion(const EventSet& s1, const EventSet& s2) -{ - EventSet res = s1; - for (auto evt : s2) - EvtSetTools::pushBack(res, evt); - return res; -} +// TODO: Implement methods on EventSet as appropriate -void EvtSetTools::pushBack(EventSet& events, UnfoldingEvent* e) -{ - if (not EvtSetTools::contains(events, e)) - events.push_back(e); -} - -bool EvtSetTools::contains(const EventSet& events, const UnfoldingEvent* e) -{ - return std::any_of(events.begin(), events.end(), [e](const UnfoldingEvent* evt) { return *evt == *e; }); -} - -} // namespace mc -} // namespace simgrid +} // namespace simgrid::mc::udpor