From cc95bf208950235c9bc6f9cae956a2fb96454ba5 Mon Sep 17 00:00:00 2001
From: Nikos Karastathis <n.karastathis@kit.edu>
Date: Thu, 11 Nov 2021 12:29:35 +0100
Subject: [PATCH] clang format

---
 .../detail/framework/geometry/FourVector.inl  | 22 +++++++++----------
 .../framework/geometry/LeapFrogTrajectory.inl |  3 ++-
 .../framework/geometry/QuantityVector.inl     |  4 ++--
 .../framework/geometry/StraightTrajectory.inl |  5 +++--
 corsika/detail/media/WeightProvider.inl       |  2 +-
 .../modules/proposal/ProposalProcessBase.inl  |  4 ++--
 tests/framework/testGeometry.cpp              |  6 ++---
 7 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/corsika/detail/framework/geometry/FourVector.inl b/corsika/detail/framework/geometry/FourVector.inl
index 5d871430d..62542aae5 100644
--- a/corsika/detail/framework/geometry/FourVector.inl
+++ b/corsika/detail/framework/geometry/FourVector.inl
@@ -54,8 +54,8 @@ namespace corsika {
   }
 
   template <typename TTimeType, typename TSpaceVecType>
-  inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
-  operator+=(FourVector const& b) {
+  inline FourVector<TTimeType, TSpaceVecType>&
+  FourVector<TTimeType, TSpaceVecType>::operator+=(FourVector const& b) {
     timeLike_ += b.timeLike_;
     spaceLike_ += b.spaceLike_;
 
@@ -63,39 +63,39 @@ namespace corsika {
   }
 
   template <typename TTimeType, typename TSpaceVecType>
-  inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
-  operator-=(FourVector const& b) {
+  inline FourVector<TTimeType, TSpaceVecType>&
+  FourVector<TTimeType, TSpaceVecType>::operator-=(FourVector const& b) {
     timeLike_ -= b.timeLike_;
     spaceLike_ -= b.spaceLike_;
     return *this;
   }
 
   template <typename TTimeType, typename TSpaceVecType>
-  inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
-  operator*=(double const b) {
+  inline FourVector<TTimeType, TSpaceVecType>&
+  FourVector<TTimeType, TSpaceVecType>::operator*=(double const b) {
     timeLike_ *= b;
     spaceLike_ *= b;
     return *this;
   }
 
   template <typename TTimeType, typename TSpaceVecType>
-  inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
-  operator/=(double const b) {
+  inline FourVector<TTimeType, TSpaceVecType>&
+  FourVector<TTimeType, TSpaceVecType>::operator/=(double const b) {
     timeLike_ /= b;
     spaceLike_.getComponents() /= b;
     return *this;
   }
 
   template <typename TTimeType, typename TSpaceVecType>
-  inline FourVector<TTimeType, TSpaceVecType>& FourVector<TTimeType, TSpaceVecType>::
-  operator/(double const b) {
+  inline FourVector<TTimeType, TSpaceVecType>&
+  FourVector<TTimeType, TSpaceVecType>::operator/(double const b) {
     *this /= b;
     return *this;
   }
 
   template <typename TTimeType, typename TSpaceVecType>
   inline typename FourVector<TTimeType, TSpaceVecType>::norm_type
-      FourVector<TTimeType, TSpaceVecType>::operator*(FourVector const& b) {
+  FourVector<TTimeType, TSpaceVecType>::operator*(FourVector const& b) {
     if constexpr (std::is_same<time_type, decltype(std::declval<space_type>() / meter *
                                                    second)>::value)
       return timeLike_ * b.timeLike_ * constants::cSquared - spaceLike_.norm();
diff --git a/corsika/detail/framework/geometry/LeapFrogTrajectory.inl b/corsika/detail/framework/geometry/LeapFrogTrajectory.inl
index 97340351e..2c5390de3 100644
--- a/corsika/detail/framework/geometry/LeapFrogTrajectory.inl
+++ b/corsika/detail/framework/geometry/LeapFrogTrajectory.inl
@@ -55,7 +55,8 @@ namespace corsika {
   }
 
   template <typename Particle>
-  inline TimeType LeapFrogTrajectory::getTime(Particle const& particle, double const u) const {
+  inline TimeType LeapFrogTrajectory::getTime(Particle const& particle,
+                                              double const u) const {
     return particle.getTime() + getDuration(u);
   }
 
diff --git a/corsika/detail/framework/geometry/QuantityVector.inl b/corsika/detail/framework/geometry/QuantityVector.inl
index a932e4de8..c7f9457b9 100644
--- a/corsika/detail/framework/geometry/QuantityVector.inl
+++ b/corsika/detail/framework/geometry/QuantityVector.inl
@@ -17,8 +17,8 @@
 namespace corsika {
 
   template <typename TDimension>
-  inline typename QuantityVector<TDimension>::quantity_type QuantityVector<TDimension>::
-  operator[](size_t const index) const {
+  inline typename QuantityVector<TDimension>::quantity_type
+  QuantityVector<TDimension>::operator[](size_t const index) const {
     return quantity_type(phys::units::detail::magnitude_tag, eigenVector_[index]);
   }
 
diff --git a/corsika/detail/framework/geometry/StraightTrajectory.inl b/corsika/detail/framework/geometry/StraightTrajectory.inl
index 55ddbf9e0..38add4e50 100644
--- a/corsika/detail/framework/geometry/StraightTrajectory.inl
+++ b/corsika/detail/framework/geometry/StraightTrajectory.inl
@@ -24,8 +24,9 @@ namespace corsika {
   }
 
   template <typename Particle>
-  inline TimeType StraightTrajectory::getTime(Particle const& particle, double const u) const {
-    return particle.getTime() + getDuration(u);//timeStep_ * u;
+  inline TimeType StraightTrajectory::getTime(Particle const& particle,
+                                              double const u) const {
+    return particle.getTime() + getDuration(u); // timeStep_ * u;
   }
 
   inline LengthType StraightTrajectory::getLength(double const u) const {
diff --git a/corsika/detail/media/WeightProvider.inl b/corsika/detail/media/WeightProvider.inl
index b9cf1be7a..2bbc58dd3 100644
--- a/corsika/detail/media/WeightProvider.inl
+++ b/corsika/detail/media/WeightProvider.inl
@@ -20,7 +20,7 @@ namespace corsika {
 
   template <class AConstIterator, class BConstIterator>
   inline typename WeightProviderIterator<AConstIterator, BConstIterator>::value_type
-      WeightProviderIterator<AConstIterator, BConstIterator>::operator*() const {
+  WeightProviderIterator<AConstIterator, BConstIterator>::operator*() const {
     return ((*aIter_) * (*bIter_)).magnitude();
   }
 
diff --git a/corsika/detail/modules/proposal/ProposalProcessBase.inl b/corsika/detail/modules/proposal/ProposalProcessBase.inl
index c7c38c104..936798ea1 100644
--- a/corsika/detail/modules/proposal/ProposalProcessBase.inl
+++ b/corsika/detail/modules/proposal/ProposalProcessBase.inl
@@ -56,8 +56,8 @@ namespace corsika::proposal {
     PROPOSAL::InterpolationSettings::TABLES_PATH = corsika_data("PROPOSAL").c_str();
   }
 
-  inline size_t ProposalProcessBase::hash::operator()(const calc_key_t& p) const
-      noexcept {
+  inline size_t ProposalProcessBase::hash::operator()(
+      const calc_key_t& p) const noexcept {
     return p.first ^ std::hash<Code>{}(p.second);
   }
 
diff --git a/tests/framework/testGeometry.cpp b/tests/framework/testGeometry.cpp
index e78ac878b..83abab67d 100644
--- a/tests/framework/testGeometry.cpp
+++ b/tests/framework/testGeometry.cpp
@@ -442,9 +442,9 @@ TEST_CASE("Geometry Trajectories") {
     LeapFrogTrajectory base(pos, v0, B0, k, t);
 
     // test the getTime() method for trajectories
-    CHECK((base.getTime(particle1,1) - t) / 1_s == Approx(0));
-    CHECK(base.getTime(particle1,0) / 1_s == Approx(0));
-    CHECK((base.getTime(particle1,0) + t) / 1_s == Approx(1e-12));
+    CHECK((base.getTime(particle1, 1) - t) / 1_s == Approx(0));
+    CHECK(base.getTime(particle1, 0) / 1_s == Approx(0));
+    CHECK((base.getTime(particle1, 0) + t) / 1_s == Approx(1e-12));
   }
 }
 
-- 
GitLab