]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify some string handling in an error message. 10800/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 6 Aug 2020 03:46:11 +0000 (21:46 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 6 Aug 2020 03:46:11 +0000 (21:46 -0600)
This was triggered by the fact that the original string lacked a space after 'assign'.

source/particles/particle.cc

index 5773db6dc1cf57aa64ff2996e39cfc96ea414e58..b3f20809fb8c32fa726252cc326a91e82ec85f1c 100644 (file)
@@ -303,16 +303,14 @@ namespace Particles
     const ArrayView<double> old_properties =
       property_pool->get_properties(properties);
 
-    Assert(
-      new_properties.size() == old_properties.size(),
-      ExcMessage(
-        std::string(
-          "You are trying to assign properties with an incompatible length. ") +
-        "The particle has space to store " +
-        std::to_string(old_properties.size()) + " properties, " +
-        "and this function tries to assign" +
-        std::to_string(new_properties.size()) + " properties. " +
-        "This is not allowed."));
+    Assert(new_properties.size() == old_properties.size(),
+           ExcMessage(
+             "You are trying to assign properties with an incompatible length. "
+             "The particle has space to store " +
+             std::to_string(old_properties.size()) +
+             " properties, but you are trying to assign " +
+             std::to_string(new_properties.size()) +
+             " properties. This is not allowed."));
 
     if (old_properties.size() > 0)
       std::copy(new_properties.begin(),

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.