From d57a811953880d3b7b37543c03c0f705784f8521 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Thu, 29 Sep 2022 18:24:43 +0200
Subject: [PATCH] shorter local var names

---
 GUI/Model/FromCore/ItemizeSample.cpp | 232 +++++++++++++--------------
 1 file changed, 116 insertions(+), 116 deletions(-)

diff --git a/GUI/Model/FromCore/ItemizeSample.cpp b/GUI/Model/FromCore/ItemizeSample.cpp
index a014b377e44..07371bfb318 100644
--- a/GUI/Model/FromCore/ItemizeSample.cpp
+++ b/GUI/Model/FromCore/ItemizeSample.cpp
@@ -377,154 +377,154 @@ void setInterference(ParticleLayoutItem* parent, const IInterference* interferen
         ASSERT(false); // missing implementation for interference type
 }
 
-void setFormFactor(std::variant<ParticleItem*, MesocrystalItem*> parent, const IFormFactor* ff)
+void setFormFactor(std::variant<ParticleItem*, MesocrystalItem*> parent, const IFormFactor* ff_arg)
 {
-    if (const auto* formfactor = dynamic_cast<const Pyramid2*>(ff)) {
+    if (const auto* ff = dynamic_cast<const Pyramid2*>(ff_arg)) {
         auto* item = addFormFactorItem<Pyramid2Item>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-        item->setAlpha(Units::rad2deg(formfactor->alpha()));
-    } else if (const auto* formfactor = dynamic_cast<const BarGauss*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+        item->setAlpha(Units::rad2deg(ff->alpha()));
+    } else if (const auto* ff = dynamic_cast<const BarGauss*>(ff_arg)) {
         auto* item = addFormFactorItem<BarGaussItem>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const BarLorentz*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const BarLorentz*>(ff_arg)) {
         auto* item = addFormFactorItem<BarLorentzItem>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const Box*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const Box*>(ff_arg)) {
         auto* item = addFormFactorItem<BoxItem>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const Cone*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const Cone*>(ff_arg)) {
         auto* item = addFormFactorItem<ConeItem>(parent);
-        item->setRadius(formfactor->radius());
-        item->setHeight(formfactor->height());
-        item->setAlpha(Units::rad2deg(formfactor->alpha()));
-    } else if (const auto* formfactor = dynamic_cast<const Pyramid6*>(ff)) {
+        item->setRadius(ff->radius());
+        item->setHeight(ff->height());
+        item->setAlpha(Units::rad2deg(ff->alpha()));
+    } else if (const auto* ff = dynamic_cast<const Pyramid6*>(ff_arg)) {
         auto* item = addFormFactorItem<Pyramid6Item>(parent);
-        item->setBaseEdge(formfactor->baseEdge());
-        item->setHeight(formfactor->height());
-        item->setAlpha(Units::rad2deg(formfactor->alpha()));
-    } else if (const auto* formfactor = dynamic_cast<const Bipyramid4*>(ff)) {
+        item->setBaseEdge(ff->baseEdge());
+        item->setHeight(ff->height());
+        item->setAlpha(Units::rad2deg(ff->alpha()));
+    } else if (const auto* ff = dynamic_cast<const Bipyramid4*>(ff_arg)) {
         auto* item = addFormFactorItem<Bipyramid4Item>(parent);
-        item->setLength(formfactor->length());
-        item->setHeight(formfactor->height());
-        item->setHeightRatio(formfactor->heightRatio());
-        item->setAlpha(Units::rad2deg(formfactor->alpha()));
-    } else if (const auto* formfactor = dynamic_cast<const Cylinder*>(ff)) {
+        item->setLength(ff->length());
+        item->setHeight(ff->height());
+        item->setHeightRatio(ff->heightRatio());
+        item->setAlpha(Units::rad2deg(ff->alpha()));
+    } else if (const auto* ff = dynamic_cast<const Cylinder*>(ff_arg)) {
         auto* item = addFormFactorItem<CylinderItem>(parent);
-        item->setRadius(formfactor->radius());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const Dodecahedron*>(ff)) {
+        item->setRadius(ff->radius());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const Dodecahedron*>(ff_arg)) {
         auto* item = addFormFactorItem<DodecahedronItem>(parent);
-        item->setEdge(formfactor->edge());
-    } else if (const auto* formfactor = dynamic_cast<const EllipsoidalCylinder*>(ff)) {
+        item->setEdge(ff->edge());
+    } else if (const auto* ff = dynamic_cast<const EllipsoidalCylinder*>(ff_arg)) {
         auto* item = addFormFactorItem<EllipsoidalCylinderItem>(parent);
-        item->setRadiusX(formfactor->radiusX());
-        item->setRadiusY(formfactor->radiusY());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const Sphere*>(ff)) {
+        item->setRadiusX(ff->radiusX());
+        item->setRadiusY(ff->radiusY());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const Sphere*>(ff_arg)) {
         auto* item = addFormFactorItem<SphereItem>(parent);
-        item->setRadius(formfactor->radius());
-    } else if (const auto* formfactor = dynamic_cast<const Spheroid*>(ff)) {
+        item->setRadius(ff->radius());
+    } else if (const auto* ff = dynamic_cast<const Spheroid*>(ff_arg)) {
         auto* item = addFormFactorItem<SpheroidItem>(parent);
-        item->setRadius(formfactor->radius());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const Icosahedron*>(ff)) {
+        item->setRadius(ff->radius());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const Icosahedron*>(ff_arg)) {
         auto* item = addFormFactorItem<IcosahedronItem>(parent);
-        item->setEdge(formfactor->edge());
-    } else if (const auto* formfactor = dynamic_cast<const HemiEllipsoid*>(ff)) {
+        item->setEdge(ff->edge());
+    } else if (const auto* ff = dynamic_cast<const HemiEllipsoid*>(ff_arg)) {
         auto* item = addFormFactorItem<HemiEllipsoidItem>(parent);
-        item->setRadiusX(formfactor->radiusX());
-        item->setRadiusY(formfactor->radiusY());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const Prism3*>(ff)) {
+        item->setRadiusX(ff->radiusX());
+        item->setRadiusY(ff->radiusY());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const Prism3*>(ff_arg)) {
         auto* item = addFormFactorItem<Prism3Item>(parent);
-        item->setBaseEdge(formfactor->baseEdge());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const Prism6*>(ff)) {
+        item->setBaseEdge(ff->baseEdge());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const Prism6*>(ff_arg)) {
         auto* item = addFormFactorItem<Prism6Item>(parent);
-        item->setBaseEdge(formfactor->baseEdge());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const Pyramid4*>(ff)) {
+        item->setBaseEdge(ff->baseEdge());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const Pyramid4*>(ff_arg)) {
         auto* item = addFormFactorItem<Pyramid4Item>(parent);
-        item->setBaseEdge(formfactor->baseEdge());
-        item->setHeight(formfactor->height());
-        item->setAlpha(Units::rad2deg(formfactor->alpha()));
-    } else if (const auto* formfactor = dynamic_cast<const CosineRippleBox*>(ff)) {
+        item->setBaseEdge(ff->baseEdge());
+        item->setHeight(ff->height());
+        item->setAlpha(Units::rad2deg(ff->alpha()));
+    } else if (const auto* ff = dynamic_cast<const CosineRippleBox*>(ff_arg)) {
         auto* item = addFormFactorItem<CosineRippleBoxItem>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const CosineRippleGauss*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const CosineRippleGauss*>(ff_arg)) {
         auto* item = addFormFactorItem<CosineRippleGaussItem>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const CosineRippleLorentz*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const CosineRippleLorentz*>(ff_arg)) {
         auto* item = addFormFactorItem<CosineRippleLorentzItem>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-    } else if (const auto* formfactor = dynamic_cast<const SawtoothRippleBox*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+    } else if (const auto* ff = dynamic_cast<const SawtoothRippleBox*>(ff_arg)) {
         auto* item = addFormFactorItem<SawtoothRippleBoxItem>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-        item->setAsymmetry(formfactor->asymmetry());
-    } else if (const auto* formfactor = dynamic_cast<const SawtoothRippleGauss*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+        item->setAsymmetry(ff->asymmetry());
+    } else if (const auto* ff = dynamic_cast<const SawtoothRippleGauss*>(ff_arg)) {
         auto* item = addFormFactorItem<SawtoothRippleGaussItem>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-        item->setAsymmetry(formfactor->asymmetry());
-    } else if (const auto* formfactor = dynamic_cast<const SawtoothRippleLorentz*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+        item->setAsymmetry(ff->asymmetry());
+    } else if (const auto* ff = dynamic_cast<const SawtoothRippleLorentz*>(ff_arg)) {
         auto* item = addFormFactorItem<SawtoothRippleLorentzItem>(parent);
-        item->setLength(formfactor->length());
-        item->setWidth(formfactor->width());
-        item->setHeight(formfactor->height());
-        item->setAsymmetry(formfactor->asymmetry());
-    } else if (const auto* formfactor = dynamic_cast<const Pyramid3*>(ff)) {
+        item->setLength(ff->length());
+        item->setWidth(ff->width());
+        item->setHeight(ff->height());
+        item->setAsymmetry(ff->asymmetry());
+    } else if (const auto* ff = dynamic_cast<const Pyramid3*>(ff_arg)) {
         auto* item = addFormFactorItem<Pyramid3Item>(parent);
-        item->setBaseEdge(formfactor->baseEdge());
-        item->setHeight(formfactor->height());
-        item->setAlpha(Units::rad2deg(formfactor->alpha()));
-    } else if (const auto* formfactor = dynamic_cast<const TruncatedCube*>(ff)) {
+        item->setBaseEdge(ff->baseEdge());
+        item->setHeight(ff->height());
+        item->setAlpha(Units::rad2deg(ff->alpha()));
+    } else if (const auto* ff = dynamic_cast<const TruncatedCube*>(ff_arg)) {
         auto* item = addFormFactorItem<TruncatedCubeItem>(parent);
-        item->setLength(formfactor->length());
-        item->setRemovedLength(formfactor->removedLength());
-    } else if (const auto* formfactor = dynamic_cast<const TruncatedSphere*>(ff)) {
+        item->setLength(ff->length());
+        item->setRemovedLength(ff->removedLength());
+    } else if (const auto* ff = dynamic_cast<const TruncatedSphere*>(ff_arg)) {
         auto* item = addFormFactorItem<TruncatedSphereItem>(parent);
-        item->setRadius(formfactor->radius());
-        item->setHeight(formfactor->height());
-        item->setRemovedTop(formfactor->removedTop());
-    } else if (const auto* formfactor = dynamic_cast<const TruncatedSpheroid*>(ff)) {
+        item->setRadius(ff->radius());
+        item->setHeight(ff->height());
+        item->setRemovedTop(ff->removedTop());
+    } else if (const auto* ff = dynamic_cast<const TruncatedSpheroid*>(ff_arg)) {
         auto* item = addFormFactorItem<TruncatedSpheroidItem>(parent);
-        item->setRadius(formfactor->radius());
-        item->setHeight(formfactor->height());
-        item->setHeightFlattening(formfactor->heightFlattening());
-        item->setRemovedTop(formfactor->removedTop());
-    } else if (const auto* formfactor = dynamic_cast<const CantellatedCube*>(ff)) {
+        item->setRadius(ff->radius());
+        item->setHeight(ff->height());
+        item->setHeightFlattening(ff->heightFlattening());
+        item->setRemovedTop(ff->removedTop());
+    } else if (const auto* ff = dynamic_cast<const CantellatedCube*>(ff_arg)) {
         auto* item = addFormFactorItem<CantellatedCubeItem>(parent);
-        item->setLength(formfactor->length());
-        item->setRemovedLength(formfactor->removedLength());
-    } else if (const auto* formfactor = dynamic_cast<const HorizontalCylinder*>(ff)) {
+        item->setLength(ff->length());
+        item->setRemovedLength(ff->removedLength());
+    } else if (const auto* ff = dynamic_cast<const HorizontalCylinder*>(ff_arg)) {
         auto* item = addFormFactorItem<HorizontalCylinderItem>(parent);
-        item->setRadius(formfactor->radius());
-        item->setLength(formfactor->length());
-        item->setSliceBottom(formfactor->slice_bottom());
-        item->setSliceTop(formfactor->slice_top());
-    } else if (const auto* formfactor = dynamic_cast<const PlatonicOctahedron*>(ff)) {
+        item->setRadius(ff->radius());
+        item->setLength(ff->length());
+        item->setSliceBottom(ff->slice_bottom());
+        item->setSliceTop(ff->slice_top());
+    } else if (const auto* ff = dynamic_cast<const PlatonicOctahedron*>(ff_arg)) {
         auto* item = addFormFactorItem<PlatonicOctahedronItem>(parent);
-        item->setEdge(formfactor->edge());
-    } else if (const auto* formfactor = dynamic_cast<const PlatonicTetrahedron*>(ff)) {
+        item->setEdge(ff->edge());
+    } else if (const auto* ff = dynamic_cast<const PlatonicTetrahedron*>(ff_arg)) {
         auto* item = addFormFactorItem<PlatonicTetrahedronItem>(parent);
-        item->setEdge(formfactor->edge());
+        item->setEdge(ff->edge());
     } else
         ASSERT(false);
 }
-- 
GitLab