From 645f4c5b43a593f436a587396527cd5ae16258e8 Mon Sep 17 00:00:00 2001 From: Walter Van Herck <w.van.herck@fz-juelich.de> Date: Tue, 19 Jun 2018 10:28:29 +0200 Subject: [PATCH] Use method call instead of function call operator in case when for_each cannot be used --- Core/Computation/DWBAComputation.cpp | 2 +- Core/Computation/DWBASingleComputation.cpp | 2 +- Core/Computation/DWBASingleComputation.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Computation/DWBAComputation.cpp b/Core/Computation/DWBAComputation.cpp index 13d4d834c43..d49425f498b 100644 --- a/Core/Computation/DWBAComputation.cpp +++ b/Core/Computation/DWBAComputation.cpp @@ -71,7 +71,7 @@ void DWBAComputation::runProtected() if (!mp_progress->alive()) return; for (auto it=m_begin_it; it != m_end_it; ++it) { - m_single_computation(*it); + m_single_computation.compute(*it); } } diff --git a/Core/Computation/DWBASingleComputation.cpp b/Core/Computation/DWBASingleComputation.cpp index a889947176e..4d36aeee67a 100644 --- a/Core/Computation/DWBASingleComputation.cpp +++ b/Core/Computation/DWBASingleComputation.cpp @@ -45,7 +45,7 @@ void DWBASingleComputation::setSpecularBinComputation(GISASSpecularComputation* mP_spec_comp.reset(p_spec_comp); } -void DWBASingleComputation::operator()(SimulationElement& elem) const +void DWBASingleComputation::compute(SimulationElement& elem) const { for (auto& layout_comp : m_layout_comps) { layout_comp->compute(elem); diff --git a/Core/Computation/DWBASingleComputation.h b/Core/Computation/DWBASingleComputation.h index 2800e6377d8..fbec6519378 100644 --- a/Core/Computation/DWBASingleComputation.h +++ b/Core/Computation/DWBASingleComputation.h @@ -46,7 +46,7 @@ public: void addLayoutComputation(ParticleLayoutComputation* p_layout_comp); void setRoughnessComputation(RoughMultiLayerComputation* p_roughness_comp); void setSpecularBinComputation(GISASSpecularComputation* p_spec_comp); - void operator()(SimulationElement& elem) const; + void compute(SimulationElement& elem) const; //! Merges its region map into the given one (notice non-const reference parameter) void mergeRegionMap(std::map<size_t, std::vector<HomogeneousRegion>>& region_map) const; -- GitLab