Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix some sonar issues in includes, after upgrade to c++17.
[simgrid.git] / include / simgrid / kernel / resource / Action.hpp
index 9524e89..b75750e 100644 (file)
@@ -13,6 +13,7 @@
 #include <boost/heap/pairing_heap.hpp>
 #include <boost/optional.hpp>
 #include <string>
+#include <string_view>
 
 static constexpr double NO_MAX_DURATION = -1.0;
 
@@ -225,7 +226,7 @@ public:
   /** @brief Get the tracing category associated to the current action */
   const std::string& get_category() const { return category_; }
   /** @brief Set the tracing category of the current Action */
-  void set_category(const std::string& category) { category_ = category; }
+  void set_category(std::string_view category) { category_ = category; }
 
   /** @brief Get the sharing_penalty (RTT or 1/thread_count) of the current Action */
   double get_sharing_penalty() const { return sharing_penalty_; };