From fad5cac0b9b8063848d3cb9b726bbfea5b8ebee8 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Mon, 23 Oct 2017 20:37:32 +0200 Subject: [PATCH] another map which is a set --- src/instr/instr_resource_utilization.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/instr/instr_resource_utilization.cpp b/src/instr/instr_resource_utilization.cpp index 127e278139..5c2eb80cf1 100644 --- a/src/instr/instr_resource_utilization.cpp +++ b/src/instr/instr_resource_utilization.cpp @@ -5,13 +5,13 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/instr/instr_private.hpp" +#include #include -#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_resource, instr, "tracing (un)-categorized resource utilization"); //to check if variables were previously set to 0, otherwise paje won't simulate them -static std::unordered_map platform_variables; +static std::set platform_variables; static void instr_event(double now, double delta, simgrid::instr::Type* variable, container_t resource, double value) { @@ -26,7 +26,7 @@ static void instr_event(double now, double delta, simgrid::instr::Type* variable // check if key exists: if it doesn't, set the variable to zero and mark this in the global map. if (platform_variables.find(key) == platform_variables.end()) { new simgrid::instr::SetVariableEvent(now, resource, variable, 0); - platform_variables[key] = std::string(""); + platform_variables.insert(key); } new simgrid::instr::AddVariableEvent(now, resource, variable, value); -- 2.20.1