From: Mikko Rasa Date: Mon, 23 Jan 2023 15:06:42 +0000 (+0200) Subject: Use a constexpr integer to define constant value X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=f33695bf14883ba034eaa60f0c8ec51c3fd183ae;p=libs%2Fmath.git Use a constexpr integer to define constant value --- diff --git a/source/interpolate/spline.h b/source/interpolate/spline.h index 1d518eb..86abd56 100644 --- a/source/interpolate/spline.h +++ b/source/interpolate/spline.h @@ -61,7 +61,7 @@ public: }; private: - enum { STRIDE = sizeof(Segment)-sizeof(Knot) }; + static constexpr std::size_t STRIDE = sizeof(Segment)-sizeof(Knot); unsigned short n_segments = 0; unsigned short capacity = 0;