diff --git a/include/linphone/utils/static-string.h b/include/linphone/utils/static-string.h index bbc421e06..44f31a847 100644 --- a/include/linphone/utils/static-string.h +++ b/include/linphone/utils/static-string.h @@ -120,7 +120,7 @@ namespace Private { raw{ char('0' + Value / pow10(N - Index - 2) % 10)..., '\0' } {} template::type* = nullptr> - constexpr StaticIntStringHelper(const IndexSequence &) : + constexpr StaticIntStringHelper (const IndexSequence &) : raw{ '-', char('0' + abs(Value) / pow10(N - Index - 3) % 10)..., '\0' } {} }; }; diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index f96a6e14d..a928cf085 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -138,16 +138,14 @@ struct SqlEventFilterBuilder {}; template struct SqlEventFilterBuilder { - static constexpr Private::StaticString<1 + getIntLength(int(Type)) + sums((1 + getIntLength(int(List)))...)> get () { - return StaticIntString() + "," + SqlEventFilterBuilder::get(); - } + static constexpr auto get () L_AUTO_RETURN( + StaticIntString() + "," + SqlEventFilterBuilder::get() + ); }; template struct SqlEventFilterBuilder { - static constexpr Private::StaticString<1 + getIntLength(int(Type))> get () { - return StaticIntString(); - } + static constexpr auto get () L_AUTO_RETURN(StaticIntString()); }; // -----------------------------------------------------------------------------