#include "xbt/log.h"
#include "xbt/misc.h"
-#include <math.h>
+#include <cmath>
namespace utf = boost::unit_test;
namespace tmgr = simgrid::trace_mgr;
explicit MockedResource() : simgrid::surf::Resource(nullptr, "fake", nullptr) {}
void apply_event(tmgr_trace_event_t event, double value)
{
- XBT_VERB("t=%.1f: Change value to %lg (idx: %d)", thedate, value, event->idx);
+ XBT_VERB("t=%.1f: Change value to %lg (idx: %u)", thedate, value, event->idx);
tmgr_trace_event_unref(&event);
}
bool isUsed() { return true; }
simgrid::trace_mgr::trace* trace = tmgr_trace_new_from_string("TheName", str, 0);
XBT_VERB("---------------------------------------------------------");
XBT_VERB("data>>\n%s<<data\n", str);
- for (auto evt : trace->event_list)
+ for (auto const& evt : trace->event_list)
XBT_VERB("event: d:%lg v:%lg", evt.date_, evt.value_);
MockedResource daResource;
res->apply_event(it, value);
whereto->push_back(tmgr::DatedValue(thedate, value));
} else {
- XBT_DEBUG("%.1f: ignore an event (idx: %d)\n", thedate, it->idx);
+ XBT_DEBUG("%.1f: ignore an event (idx: %u)\n", thedate, it->idx);
}
}
tmgr_finalize();