Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'actor-comms' into 'master'
[simgrid.git] / src / kernel / resource / FactorSet.cpp
index 81012bd2a5b2b7e7240529e52973630ca42ac07f..179498973bb089ba0ddeb6d5c66845a42e44d9ba 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2016-2023. 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. */
@@ -57,14 +57,14 @@ void FactorSet::parse(const std::string& values)
         try {
           fact.factor = std::stoi(*factor_iter);
         } catch (const std::invalid_argument&) {
-          throw std::invalid_argument(std::string("Invalid factor in chunk ") + std::to_string(factors_.size() + 1) +
-                                      ": " + *factor_iter + " for " + name_);
+          throw std::invalid_argument("Invalid factor in chunk " + std::to_string(factors_.size() + 1) + ": " +
+                                      *factor_iter + " for " + name_);
         }
       } else {
         try {
           fact.values.push_back(xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, *factor_iter, ""));
         } catch (const std::invalid_argument&) {
-          throw std::invalid_argument(std::string("Invalid factor value ") + std::to_string(iteration) + " in chunk " +
+          throw std::invalid_argument("Invalid factor value " + std::to_string(iteration) + " in chunk " +
                                       std::to_string(factors_.size() + 1) + ": " + *factor_iter + " for " + name_);
         }
       }
@@ -87,12 +87,12 @@ FactorSet::FactorSet(const std::string& name, double default_value,
 {
 }
 
-double FactorSet::operator()()
+double FactorSet::operator()() const
 {
   return default_value_;
 }
 
-double FactorSet::operator()(double size)
+double FactorSet::operator()(double size) const
 {
   if (factors_.empty())
     return default_value_;