Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'maximal-subset-search' into 'master'
[simgrid.git] / src / xbt / xbt_parse_units.cpp
index 8a8929c..768ceca 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -62,9 +62,9 @@ static double xbt_parse_get_value_with_unit(const std::string& filename, int lin
   double res      = strtod(string.c_str(), &endptr);
   const char* ptr = endptr; // for const-correctness
   if (errno == ERANGE)
-    throw simgrid::ParseError(filename, lineno, std::string("value out of range: ") + string);
+    throw simgrid::ParseError(filename, lineno, "value out of range: " + string);
   if (ptr == string)
-    throw simgrid::ParseError(filename, lineno, std::string("cannot parse number:") + string);
+    throw simgrid::ParseError(filename, lineno, "cannot parse number:" + string);
   if (ptr[0] == '\0') {
     // Ok, 0 can be unit-less
     if (res != 0 && not entity_kind.empty())