]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/resource/profile/StochasticDatedValue.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Misc code simplifications guided by Sonar smells.
[simgrid.git] / src / kernel / resource / profile / StochasticDatedValue.cpp
index 6830b75bc836753d5af2eb034e43a2b19b731ac5..36d84b6734c9c0d6ba9fb1bab274f519fd8067ee 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-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. */
@@ -27,15 +27,18 @@ double StochasticDatedValue::draw(Distribution law, std::vector<double> params)
       xbt_die("Unimplemented distribution");
   }
 }
-double StochasticDatedValue::get_value()
+
+double StochasticDatedValue::get_value() const
 {
   return draw(value_law, value_params);
 }
-double StochasticDatedValue::get_date()
+
+double StochasticDatedValue::get_date() const
 {
   return draw(date_law, date_params);
 }
-DatedValue StochasticDatedValue::get_datedvalue()
+
+DatedValue StochasticDatedValue::get_datedvalue() const
 {
   DatedValue event;
   event.date_  = get_date();