From 07174050c3fda14636ffceb24c70ccd9ba246cb8 Mon Sep 17 00:00:00 2001 From: Maximilian Reininghaus <maximilian.reininghaus@tu-dortmund.de> Date: Tue, 18 Jun 2019 23:26:12 +0200 Subject: [PATCH] simplified QuantitVector::GetX/Y/Z --- Framework/Geometry/QuantityVector.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Framework/Geometry/QuantityVector.h b/Framework/Geometry/QuantityVector.h index 2c09260c0..0b3776464 100644 --- a/Framework/Geometry/QuantityVector.h +++ b/Framework/Geometry/QuantityVector.h @@ -54,11 +54,11 @@ namespace corsika::geometry { return Quantity(phys::units::detail::magnitude_tag, eVector[index]); } - auto GetX() const { return Quantity(phys::units::detail::magnitude_tag, eVector[0]); } + auto GetX() const { return (*this)[0]; } - auto GetY() const { return Quantity(phys::units::detail::magnitude_tag, eVector[1]); } + auto GetY() const { return (*this)[1]; } - auto GetZ() const { return Quantity(phys::units::detail::magnitude_tag, eVector[2]); } + auto GetZ() const { return (*this)[2]; } auto norm() const { return Quantity(phys::units::detail::magnitude_tag, eVector.norm()); -- GitLab