-/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-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. */
while (pending_finalize_messages > 0) {
if (my_mbox->ready()) {
double start = simgrid::s4u::Engine::get_clock();
- std::string* received = static_cast<std::string*>(my_mbox->get());
+ const std::string* received = static_cast<std::string*>(my_mbox->get());
double waiting_time = simgrid::s4u::Engine::get_clock() - start;
xbt_assert(waiting_time == 0, "Expecting the waiting time to be 0 because the communication was supposedly ready, but got %f instead", waiting_time);
XBT_INFO("I got a '%s'.", received->c_str());