X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c587485ee2aae6b2c54ed80656cbdc4e3ba8d157..30563d26d6d84d528cda7deda5baa6730cebd948:/src/mc/VisitedState.cpp diff --git a/src/mc/VisitedState.cpp b/src/mc/VisitedState.cpp index 5b8919be6e..e491e7c752 100644 --- a/src/mc/VisitedState.cpp +++ b/src/mc/VisitedState.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2011-2020. 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. */ @@ -33,10 +33,9 @@ void VisitedStates::prune() { while (states_.size() > (std::size_t)_sg_mc_max_visited_states) { XBT_DEBUG("Try to remove visited state (maximum number of stored states reached)"); - auto min_element = boost::range::min_element(states_, - [](std::unique_ptr& a, std::unique_ptr& b) { - return a->num < b->num; - }); + auto min_element = boost::range::min_element( + states_, [](const std::unique_ptr& a, + const std::unique_ptr& b) { return a->num < b->num; }); xbt_assert(min_element != states_.end()); // and drop it: states_.erase(min_element);