From 0d3740cc87cf1917df39b03a8a681d8965c481bd Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Fri, 26 Feb 2021 14:25:01 +0100 Subject: [PATCH] refactor: `earth_radius` moved to cpp file --- example/geographic.cpp | 7 +++++++ example/geographic.h | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/example/geographic.cpp b/example/geographic.cpp index 4df92a14..214775d7 100644 --- a/example/geographic.cpp +++ b/example/geographic.cpp @@ -24,6 +24,13 @@ #include #include +namespace { + +using namespace units::physical::si::unit_constants; +inline constexpr auto earth_radius = 6371 * km; + +} // namespace + namespace geographic { distance spherical_distance(position from, position to) diff --git a/example/geographic.h b/example/geographic.h index 2c00d549..b03eab3b 100644 --- a/example/geographic.h +++ b/example/geographic.h @@ -119,9 +119,6 @@ namespace geographic { struct horizontal_kind : units::kind {}; using distance = units::quantity_kind; -using namespace units::physical::si::unit_constants; -inline constexpr auto earth_radius = 6371 * km; - struct position { latitude lat; longitude lon;