-/* Copyright (c) 2008-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2008-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. */
State::State(unsigned long state_number) : num_(state_number)
{
- this->internal_comm_.clear();
- auto maxpid = api::get().get_maxpid();
+ const unsigned long maxpid = api::get().get_maxpid();
actor_states_.resize(maxpid);
/* Stateful model checking */
if ((_sg_mc_checkpoint > 0 && (state_number % _sg_mc_checkpoint == 0)) || _sg_mc_termination) {
void State::copy_incomplete_comm_pattern()
{
incomplete_comm_pattern_.clear();
- for (unsigned long i = 0; i < api::get().get_maxpid(); i++) {
+ const unsigned long maxpid = api::get().get_maxpid();
+ for (unsigned long i = 0; i < maxpid; i++) {
std::vector<simgrid::mc::PatternCommunication> res;
for (auto const& comm : incomplete_communications_pattern[i])
res.push_back(comm->dup());