-/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-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. */
* and get an iterator over the integrated trace */
Event* Profile::schedule(FutureEvtSet* fes, resource::Resource* resource)
{
- Event* event = new Event();
+ auto* event = new Event();
event->profile = this;
event->idx = 0;
event->resource = resource;
Profile* Profile::from_string(const std::string& name, const std::string& input, double periodicity)
{
int linecount = 0;
- simgrid::kernel::profile::Profile* profile = new simgrid::kernel::profile::Profile();
+ auto* profile = new simgrid::kernel::profile::Profile();
simgrid::kernel::profile::DatedValue* last_event = &(profile->event_list.back());
xbt_assert(trace_list.find(name) == trace_list.end(), "Refusing to define trace %s twice", name.c_str());
xbt_assert(not path.empty(), "Cannot parse a trace from an empty filename");
xbt_assert(trace_list.find(path) == trace_list.end(), "Refusing to define trace %s twice", path.c_str());
- std::ifstream* f = surf_ifsopen(path);
+ const std::ifstream* f = surf_ifsopen(path);
xbt_assert(not f->fail(), "Cannot open file '%s' (path=%s)", path.c_str(), (boost::join(surf_path, ":")).c_str());
std::stringstream buffer;