From efab955d858a4ea94b6cd3047607c8fd83542a18 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 2 Jan 2022 18:47:48 +0100 Subject: [PATCH] cleanup: make feet_to_mm signed Depths are pretty much universally stored using signed integers (e.g. depth_t is signed int). For consistency, make feet_to_mm() likewise return a signed value. Signed-off-by: Berthold Stoeger --- core/units.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/units.h b/core/units.h index 86403731b..a67f4aa6f 100644 --- a/core/units.h +++ b/core/units.h @@ -200,7 +200,7 @@ static inline double m_to_mile(int m) return m / 1609.344; } -static inline unsigned long feet_to_mm(double feet) +static inline long feet_to_mm(double feet) { return lrint(feet * 304.8); }