-/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2023. 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. */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_api, instr, "API");
-std::set<std::string, std::less<>> created_categories;
-std::set<std::string, std::less<>> declared_marks;
-std::set<std::string, std::less<>> user_host_variables;
-std::set<std::string, std::less<>> user_vm_variables;
-std::set<std::string, std::less<>> user_link_variables;
+static std::set<std::string, std::less<>> created_categories;
+static std::set<std::string, std::less<>> declared_marks;
+static std::set<std::string, std::less<>> user_host_variables;
+static std::set<std::string, std::less<>> user_vm_variables;
+static std::set<std::string, std::less<>> user_link_variables;
static void instr_user_variable(double time, const std::string& resource, const std::string& variable_name,
const std::string& parent_type, double value, InstrUserVariable what,
instr_user_variable(time, link->get_cname(), variable, "LINK", value, what, "", &user_link_variables);
}
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
/* for host variables */
/** @brief Declare a new user variable associated to hosts.
*
double blue = simgrid::xbt::random::uniform_real(0.0, std::nextafter(1.0, 2.0));
final_color = std::to_string(red) + " " + std::to_string(green) + " " + std::to_string(blue);
} else {
- final_color = std::string(color);
+ final_color = color;
}
XBT_DEBUG("CAT,declare %s, \"%s\" \"%s\"", name.c_str(), color.c_str(), final_color.c_str());
return created_categories;
}
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
static xbt_dynar_t instr_set_to_dynar(const std::set<std::string, std::less<>>& filter) // XBT_ATTRIB_DEPRECATED_v334
{