void surf_presolve()
{
- double next_event_date = -1.0;
- simgrid::kernel::profile::Event* event = nullptr;
- double value = -1.0;
- simgrid::kernel::resource::Resource* resource = nullptr;
-
XBT_DEBUG ("Consume all trace events occurring before the starting time.");
+ double next_event_date;
while ((next_event_date = simgrid::kernel::profile::future_evt_set.next_date()) != -1.0) {
if (next_event_date > NOW)
break;
+ simgrid::kernel::profile::Event* event;
+ double value = -1.0;
+ simgrid::kernel::resource::Resource* resource = nullptr;
while ((event = simgrid::kernel::profile::future_evt_set.pop_leq(next_event_date, &value, &resource))) {
if (value >= 0)
resource->apply_event(event, value);
surf_parse_error(std::string("Invalid direction for link ") + A_surfxml_link___ctn_id);
}
- const char* dirname = "";
+ const char* dirname;
switch (A_surfxml_link___ctn_direction) {
case A_surfxml_link___ctn_direction_UP:
dirname = " (upward)";
template <typename F, typename T> void test_parse_ok(F function, const std::string& name, const char* str, T value)
{
INFO(name);
- auto variable = static_cast<T>(-9999);
+ T variable;
REQUIRE_NOTHROW(variable = function(str, "Parse error"));
REQUIRE(variable == value); /* Fail to parse str */
}