From 844598133c9a3053f305b2875b99884697e12c78 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 19 Oct 2020 19:26:43 -0600 Subject: [PATCH] Rename a local variable. --- source/particles/particle.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/particles/particle.cc b/source/particles/particle.cc index d3568e0330..69f16624cd 100644 --- a/source/particles/particle.cc +++ b/source/particles/particle.cc @@ -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 old_properties = + const ArrayView 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()); } -- 2.39.5