From eb60126903245deebba1acdade2618619a8dde22 Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Mon, 24 Aug 2020 13:13:25 -0700 Subject: [PATCH] not constexpr enough for C++14? --- cores/nRF5/Tone.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/nRF5/Tone.cpp b/cores/nRF5/Tone.cpp index 3ebe950f..27a8a88a 100644 --- a/cores/nRF5/Tone.cpp +++ b/cores/nRF5/Tone.cpp @@ -111,7 +111,7 @@ constexpr static uint64_t _calculate_pulse_count(uint32_t frequency, uint32_t du (duration / 1000ULL) * frequency : (((uint64_t)duration) * frequency / 1000ULL); }; -constexpr static int _bits_used(unsigned long x) { +static int _bits_used(unsigned long x) { if (0 == x) return 0; unsigned int result = 0; do { @@ -119,7 +119,7 @@ constexpr static int _bits_used(unsigned long x) { } while (x >>= 1); return result; } -constexpr static int _bits_used(unsigned long long x) { +static int _bits_used(unsigned long long x) { if (0 == x) return 0; unsigned int result = 0; do {