From ae355a62425baead9143848319794012261a08ac Mon Sep 17 00:00:00 2001 From: ado Date: Tue, 23 Feb 2021 20:48:18 +0100 Subject: [PATCH] remove one warning, update the other --- include/ss/extract.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/ss/extract.hpp b/include/ss/extract.hpp index e6f65f0..d4170c0 100644 --- a/include/ss/extract.hpp +++ b/include/ss/extract.hpp @@ -42,7 +42,6 @@ inline std::optional from_char(char c) { // mingw32 clang does not support some of the builtin functions #if (defined(__clang__) || defined(__GNUC__) || defined(__GUNG__)) && \ !defined(MINGW32_CLANG) -#warning "using mul functions" //////////////// // mul overflow detection //////////////// @@ -170,7 +169,9 @@ bool shift_and_add_overflow(T& value, T digit, F add_last_digit_owerflow) { } #else -#warning "Use clang or gcc if possible." +#ifndef SS_NO_WARNINGS +#warning "Use clang or gcc if possible for performance reasons. Define SS_NO_WARNINGS to supress warning." +#endif template bool shift_and_add_overflow(T& value, T digit, U is_negative) { digit = (is_negative) ? -digit : digit;