fix(MainDb): SqlEventFilterBuilder => better code

This commit is contained in:
Ronan Abhamon 2018-05-21 14:49:01 +02:00
parent fc3ac05c55
commit 1cbfe4e499
2 changed files with 5 additions and 7 deletions

View file

@ -138,16 +138,14 @@ struct SqlEventFilterBuilder {};
template<EventLog::Type Type, EventLog::Type... List> template<EventLog::Type Type, EventLog::Type... List>
struct SqlEventFilterBuilder<Type, List...> { struct SqlEventFilterBuilder<Type, List...> {
static constexpr Private::StaticString<1 + getIntLength(int(Type)) + sums((1 + getIntLength(int(List)))...)> get () { static constexpr auto get () L_AUTO_RETURN(
return StaticIntString<int(Type)>() + "," + SqlEventFilterBuilder<List...>::get(); StaticIntString<int(Type)>() + "," + SqlEventFilterBuilder<List...>::get()
} );
}; };
template<EventLog::Type Type> template<EventLog::Type Type>
struct SqlEventFilterBuilder<Type> { struct SqlEventFilterBuilder<Type> {
static constexpr Private::StaticString<1 + getIntLength(int(Type))> get () { static constexpr auto get () L_AUTO_RETURN(StaticIntString<int(Type)>());
return StaticIntString<int(Type)>();
}
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------