Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Declare local variables inside the if statement.
[simgrid.git] / src / instr / instr_resource_utilization.cpp
index 1e52e69..a2f4806 100644 (file)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2010-2020. The SimGrid Team.
+/* Copyright (c) 2010-2022. 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 "src/instr/instr_private.hpp"
+#include "xbt/log.h"
 #include <string>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_resource, instr, "tracing (un)-categorized resource utilization");
@@ -15,7 +16,7 @@ void resource_set_utilization(const char* type, const char* name, const char* re
                               double value, double now, double delta)
 {
   // only trace resource utilization if resource is known by tracing mechanism
-  container_t container = Container::by_name_or_null(resource);
+  Container* container = Container::by_name_or_null(resource);
   if (container == nullptr || value == 0.0)
     return;