From 3d49281460d6fc87faf048045e2b2627f983c1a9 Mon Sep 17 00:00:00 2001
From: Nikos Karastathis <n.karastathis@kit.edu>
Date: Tue, 16 Mar 2021 16:31:39 +0100
Subject: [PATCH] fixed - operator reference to QuantityVector.hpp and
 Vector.hpp

---
 corsika/detail/framework/geometry/QuantityVector.inl | 8 ++++----
 corsika/detail/framework/geometry/Vector.inl         | 2 +-
 corsika/framework/geometry/QuantityVector.hpp        | 8 ++++----
 corsika/framework/geometry/Vector.hpp                | 2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/corsika/detail/framework/geometry/QuantityVector.inl b/corsika/detail/framework/geometry/QuantityVector.inl
index 7af47d7e1..c7f9457b9 100644
--- a/corsika/detail/framework/geometry/QuantityVector.inl
+++ b/corsika/detail/framework/geometry/QuantityVector.inl
@@ -102,26 +102,26 @@ namespace corsika {
   }
 
   template <typename TDimension>
-  inline auto QuantityVector<TDimension>::operator/=(double const p) {
+  inline auto& QuantityVector<TDimension>::operator/=(double const p) {
     eigenVector_ /= p;
     return *this;
   }
 
   template <typename TDimension>
-  inline auto QuantityVector<TDimension>::operator*=(double const p) {
+  inline auto& QuantityVector<TDimension>::operator*=(double const p) {
     eigenVector_ *= p;
     return *this;
   }
 
   template <typename TDimension>
-  inline auto QuantityVector<TDimension>::operator+=(
+  inline auto& QuantityVector<TDimension>::operator+=(
       QuantityVector<TDimension> const& pQVec) {
     eigenVector_ += pQVec.eigenVector_;
     return *this;
   }
 
   template <typename TDimension>
-  inline auto QuantityVector<TDimension>::operator-=(
+  inline auto& QuantityVector<TDimension>::operator-=(
       QuantityVector<TDimension> const& pQVec) {
     eigenVector_ -= pQVec.eigenVector_;
     return *this;
diff --git a/corsika/detail/framework/geometry/Vector.inl b/corsika/detail/framework/geometry/Vector.inl
index 352eb8b30..93907b944 100644
--- a/corsika/detail/framework/geometry/Vector.inl
+++ b/corsika/detail/framework/geometry/Vector.inl
@@ -194,7 +194,7 @@ namespace corsika {
   }
 
   template <typename TDimension>
-  inline auto& Vector<TDimension>::operator-() const {
+  inline auto Vector<TDimension>::operator-() const {
     return Vector<TDimension>(BaseVector<TDimension>::getCoordinateSystem(),
                               -BaseVector<TDimension>::getQuantityVector());
   }
diff --git a/corsika/framework/geometry/QuantityVector.hpp b/corsika/framework/geometry/QuantityVector.hpp
index 2c951a52b..ac7afc51e 100644
--- a/corsika/framework/geometry/QuantityVector.hpp
+++ b/corsika/framework/geometry/QuantityVector.hpp
@@ -81,13 +81,13 @@ namespace corsika {
 
     auto operator/(double const p) const;
 
-    auto operator/=(double const p);
+    auto& operator/=(double const p);
 
-    auto operator*=(double const p);
+    auto& operator*=(double const p);
 
-    auto operator+=(QuantityVector<TDimension> const& pQVec);
+    auto& operator+=(QuantityVector<TDimension> const& pQVec);
 
-    auto operator-=(QuantityVector<TDimension> const& pQVec);
+    auto& operator-=(QuantityVector<TDimension> const& pQVec);
 
     auto operator-() const;
 
diff --git a/corsika/framework/geometry/Vector.hpp b/corsika/framework/geometry/Vector.hpp
index fec720e4d..2a4b34a19 100644
--- a/corsika/framework/geometry/Vector.hpp
+++ b/corsika/framework/geometry/Vector.hpp
@@ -131,7 +131,7 @@ namespace corsika {
 
     auto& operator-=(Vector<TDimension> const& pVec);
 
-    auto& operator-() const;
+    auto operator-() const;
 
     auto normalized() const;
 
-- 
GitLab