X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cef6554994ae17d8f56c9245ad2c10c7cf39af8c..3f9b311ec56db95ec539001a860ae3c838c48312:/include/simgrid/plugins/battery.hpp diff --git a/include/simgrid/plugins/battery.hpp b/include/simgrid/plugins/battery.hpp index 61937a91a6..fc395053df 100644 --- a/include/simgrid/plugins/battery.hpp +++ b/include/simgrid/plugins/battery.hpp @@ -105,7 +105,7 @@ private: double energy_consumed_j_ = 0; double last_updated_ = 0; - explicit Battery(); + explicit Battery() = default; explicit Battery(const std::string& name, double state_of_charge, double nominal_charge_power_w, double nominal_discharge_power_w, double charge_efficiency, double discharge_efficiency, double initial_capacity_wh, int cycles); @@ -133,7 +133,7 @@ public: void set_load(const std::string& name, double power_w); void set_load(const std::string& name, bool active); void connect_host(s4u::Host* host, bool active = true); - std::string get_name() {return name_;} + std::string get_name() const { return name_; } double get_state_of_charge(); double get_state_of_health(); double get_capacity();