X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ec83ae9a081ffd1d19bfecaf81cb99c32bdf6b83..dc63d290001cd127af79685f3cd811e03eebcece:/src/instr/jedule/jedule_events.cpp diff --git a/src/instr/jedule/jedule_events.cpp b/src/instr/jedule/jedule_events.cpp index b4d48108c5..7047f22c36 100644 --- a/src/instr/jedule/jedule_events.cpp +++ b/src/instr/jedule/jedule_events.cpp @@ -1,13 +1,10 @@ -/* Copyright (c) 2010-2016. The SimGrid Team. +/* Copyright (c) 2010-2018. 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. */ -#include "simgrid/jedule/jedule_events.hpp" - #include "simgrid/jedule/jedule.hpp" -#include "simgrid/jedule/jedule_platform.hpp" #include "simgrid/s4u/NetZone.hpp" #include "xbt/asserts.h" @@ -23,25 +20,26 @@ Event::Event(std::string name, double start_time, double end_time, std::string t Event::~Event() { - if (!this->resource_subsets->empty()){ - for (auto subset: *this->resource_subsets) + if (not this->resource_subsets->empty()) { + for (auto const& subset : *this->resource_subsets) delete subset; delete this->resource_subsets; } } -void Event::addResources(std::vector *host_selection) +void Event::add_resources(std::vector* host_selection) { get_resource_selection_by_hosts(this->resource_subsets, host_selection); } -void Event::addCharacteristic(char *characteristic) +void Event::add_characteristic(char* characteristic) { xbt_assert( characteristic != nullptr ); this->characteristics_list.push_back(characteristic); } -void Event::addInfo(char* key, char *value) { +void Event::add_info(char* key, char* value) +{ xbt_assert((key != nullptr) && value != nullptr); this->info_map.insert({key, value}); } @@ -54,26 +52,26 @@ void Event::print(FILE *jed_file) fprintf(jed_file, " \n", this->end_time); fprintf(jed_file, " \n", this->type.c_str()); - xbt_assert(!this->resource_subsets-> empty()); + xbt_assert(not this->resource_subsets->empty()); fprintf(jed_file, " \n"); - for (auto subset: *this->resource_subsets) { + for (auto const& subset : *this->resource_subsets) { fprintf(jed_file, "