for some reason [[maybe_unused]] is hated by buster 32 bit x86 so we do something else

to appease that compiler.
This commit is contained in:
Jeff Becker 2021-05-11 08:36:01 -04:00
parent 18c5b43e63
commit acdb8a19a6
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -100,11 +100,12 @@ namespace llarp
template <typename... T> template <typename... T>
struct LogTrace struct LogTrace
{ {
LogTrace( LogTrace(T... args, const slns::source_location& location = slns::source_location::current())
[[maybe_unused]] T... args,
[[maybe_unused]] const slns::source_location& location = slns::source_location::current())
{ {
#ifndef NDEBUG #ifdef NDEBUG
const auto discard = [](auto&&...) {};
discard(location, std::forward<T>(args)...);
#else
_log(eLogTrace, location, std::forward<T>(args)...); _log(eLogTrace, location, std::forward<T>(args)...);
#endif #endif
} }
@ -116,11 +117,12 @@ namespace llarp
template <typename... T> template <typename... T>
struct LogDebug struct LogDebug
{ {
LogDebug( LogDebug(T... args, const slns::source_location& location = slns::source_location::current())
[[maybe_unused]] T... args,
[[maybe_unused]] const slns::source_location& location = slns::source_location::current())
{ {
#ifndef NDEBUG #ifdef NDEBUG
const auto discard = [](auto&&...) {};
discard(location, std::forward<T>(args)...);
#else
_log(eLogDebug, location, std::forward<T>(args)...); _log(eLogDebug, location, std::forward<T>(args)...);
#endif #endif
} }