X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39f579ce40d3bd04d9f64a7914b07d1ec3334e4b..7f7804d0b147046559399b0cf51aaac8eebeae08:/src/surf/surf_c_bindings.cpp diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index 588764b3d0..10d2874153 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-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. */ @@ -46,7 +46,6 @@ void surf_presolve() double surf_solve(double max_date) { double time_delta = -1.0; /* duration */ - double model_next_action_end = -1.0; double value = -1.0; simgrid::kernel::resource::Resource* resource = nullptr; simgrid::kernel::profile::Event* event = nullptr; @@ -83,7 +82,7 @@ double surf_solve(double max_date) XBT_DEBUG("Looking for next trace event"); - while (1) { // Handle next occurring events until none remains + while (true) { // Handle next occurring events until none remains double next_event_date = simgrid::kernel::profile::future_evt_set.next_date(); XBT_DEBUG("Next TRACE event: %f", next_event_date); @@ -96,7 +95,7 @@ double surf_solve(double max_date) XBT_DEBUG("Run the NS3 network at most %fs", time_delta); // run until min or next flow - model_next_action_end = surf_network_model->next_occurring_event(time_delta); + double model_next_action_end = surf_network_model->next_occurring_event(time_delta); XBT_DEBUG("Min for network : %f", model_next_action_end); if (model_next_action_end >= 0.0) @@ -147,7 +146,5 @@ double surf_solve(double max_date) simgrid::s4u::Engine::on_time_advance(time_delta); - TRACE_paje_dump_buffer(false); - return time_delta; }