diff --git a/corsika/framework/geometry/CoordinateSystem.hpp b/corsika/framework/geometry/CoordinateSystem.hpp index 13a8461cade7a2759bf511f3d93cc6545e8698bb..fb3a7040818a02fa3dd0f64263845ed02b07d599 100644 --- a/corsika/framework/geometry/CoordinateSystem.hpp +++ b/corsika/framework/geometry/CoordinateSystem.hpp @@ -35,7 +35,7 @@ namespace corsika { using CoordinateSystemPtr = std::shared_ptr<CoordinateSystem const>; /// this is the only way to create ONE unique root CS - static CoordinateSystemPtr& get_root_CoordinateSystem(); + CoordinateSystemPtr const& get_root_CoordinateSystem(); /** * Creates new CoordinateSystemPtr by translation along \a vector @@ -134,7 +134,7 @@ namespace corsika { * \{ **/ - friend CoordinateSystemPtr& get_root_CoordinateSystem(); + friend CoordinateSystemPtr const& get_root_CoordinateSystem(); friend CoordinateSystemPtr make_translation(CoordinateSystemPtr const& cs, QuantityVector<length_d> const& vector); diff --git a/corsika/framework/geometry/RootCoordinateSystem.hpp b/corsika/framework/geometry/RootCoordinateSystem.hpp index 41d2654d5973efedf63ca1ab1b0b640acd3e89b2..3585bf35c7fd0c2db2ccf3d8bed67824d83c1e7c 100644 --- a/corsika/framework/geometry/RootCoordinateSystem.hpp +++ b/corsika/framework/geometry/RootCoordinateSystem.hpp @@ -27,8 +27,8 @@ namespace corsika { * RootCoordinateSystem */ - static inline CoordinateSystemPtr& get_root_CoordinateSystem() { - static CoordinateSystemPtr rootCS(new CoordinateSystem); // THIS IS IT + inline CoordinateSystemPtr const& get_root_CoordinateSystem() { + static CoordinateSystemPtr const rootCS(new CoordinateSystem); // THIS IS IT return rootCS; }