Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer to use emplace_back.
[simgrid.git] / src / instr / jedule / jedule_events.cpp
index 2744fcd..ea2dd37 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2019. The SimGrid Team.
+/* Copyright (c) 2010-2020. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -17,10 +17,10 @@ void Event::add_resources(const std::vector<sg_host_t>& host_selection)
   get_resource_selection_by_hosts(this->resource_subsets_, host_selection);
 }
 
-void Event::add_characteristic(char* characteristic)
+void Event::add_characteristic(const char* characteristic)
 {
   xbt_assert( characteristic != nullptr );
-  this->characteristics_list_.push_back(characteristic);
+  this->characteristics_list_.emplace_back(characteristic);
 }
 
 void Event::add_info(char* key, char* value)