diff --git a/brain/neuron/soma.cpp b/brain/neuron/soma.cpp index 91b377a0..b097bcaf 100644 --- a/brain/neuron/soma.cpp +++ b/brain/neuron/soma.cpp @@ -35,7 +35,7 @@ glm::vec3 _computeCentroid(const Vector4fs& points) centroid /= static_cast(points.size()); return centroid; } -} +} // namespace Soma::Soma(Morphology::ImplPtr morphology) : _morphology(morphology) @@ -69,7 +69,7 @@ float Soma::getMeanRadius() const const auto centroid = _computeCentroid(points); float radius = 0; - for (const auto point : points) + for (const auto& point : points) radius += glm::length(glm::vec3(point) - centroid); return radius /= float(points.size()); } @@ -105,5 +105,5 @@ Sections Soma::getChildren() const result.push_back(Section(id, _morphology)); return result; } -} -} +} // namespace neuron +} // namespace brain diff --git a/brion/plugin/compartmentReportHDF5Sonata.cpp b/brion/plugin/compartmentReportHDF5Sonata.cpp index bd032fb3..cbb87491 100644 --- a/brion/plugin/compartmentReportHDF5Sonata.cpp +++ b/brion/plugin/compartmentReportHDF5Sonata.cpp @@ -422,7 +422,7 @@ bool CompartmentReportHDF5Sonata::_loadFrame(const size_t frameNumber, // Reading slice by slice and processing all cells contained in a given // slice size_t targetOffset = 0; - for (const auto interval : intervals) + for (const auto& interval : intervals) { const auto sourceOffset = interval.first; const auto count = interval.second - sourceOffset; diff --git a/brion/simulationConfig.cpp b/brion/simulationConfig.cpp index f8aab742..f2a9a422 100644 --- a/brion/simulationConfig.cpp +++ b/brion/simulationConfig.cpp @@ -149,7 +149,7 @@ std::string SimulationConfig::getSpikesFilepath() const Strings SimulationConfig::getCompartmentReportNames() const { Strings names; - for (const auto item : _impl->reportFilepaths) + for (const auto& item : _impl->reportFilepaths) names.push_back(item.first); return names; }