]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename a local variable.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 Oct 2020 01:26:43 +0000 (19:26 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 Oct 2020 02:46:50 +0000 (20:46 -0600)
source/particles/particle.cc

index d3568e0330687d39e9f0519cb11b13cc5c34a9eb..69f16624cd54560737a2a5ccf42b989fee3c4dd0 100644 (file)
@@ -238,25 +238,26 @@ namespace Particles
   {
     Assert(property_pool != nullptr, ExcInternalError());
 
+    // If we haven't allocated memory yet, do so now
     if (properties == PropertyPool::invalid_handle)
       properties = property_pool->allocate_properties_array();
 
-    const ArrayView<double> old_properties =
+    const ArrayView<double> property_values =
       property_pool->get_properties(properties);
 
-    Assert(new_properties.size() == old_properties.size(),
+    Assert(new_properties.size() == property_values.size(),
            ExcMessage(
              "You are trying to assign properties with an incompatible length. "
              "The particle has space to store " +
-             std::to_string(old_properties.size()) +
+             std::to_string(property_values.size()) +
              " properties, but you are trying to assign " +
              std::to_string(new_properties.size()) +
              " properties. This is not allowed."));
 
-    if (old_properties.size() > 0)
+    if (property_values.size() > 0)
       std::copy(new_properties.begin(),
                 new_properties.end(),
-                old_properties.begin());
+                property_values.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.