From b6daf83088fdca86eeb7c58801ffb64a39321f8f Mon Sep 17 00:00:00 2001 From: Alexander Lerach Date: Thu, 14 Nov 2024 15:20:47 +0100 Subject: [PATCH] Un-inlined get_table_data --- src/lib/world_magnetic_model/geo_mag_declination.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/world_magnetic_model/geo_mag_declination.cpp b/src/lib/world_magnetic_model/geo_mag_declination.cpp index 64738426f5..46e4cb6ec0 100644 --- a/src/lib/world_magnetic_model/geo_mag_declination.cpp +++ b/src/lib/world_magnetic_model/geo_mag_declination.cpp @@ -53,7 +53,7 @@ using math::constrain; -static constexpr unsigned get_lookup_table_index(float *val, float min, float max) +static unsigned get_lookup_table_index(float *val, float min, float max) { /* for the rare case of hitting the bounds exactly * the rounding logic wouldn't fit, so enforce it. @@ -66,7 +66,7 @@ static constexpr unsigned get_lookup_table_index(float *val, float min, float ma return static_cast((-(min) + *val) / SAMPLING_RES); } -static constexpr float get_table_data(float latitude_deg, float longitude_deg, const int16_t table[LAT_DIM][LON_DIM]) +static float get_table_data(float latitude_deg, float longitude_deg, const int16_t table[LAT_DIM][LON_DIM]) { latitude_deg = math::constrain(latitude_deg, SAMPLING_MIN_LAT, SAMPLING_MAX_LAT);