mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-31 09:20:21 +00:00
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:
parent
18c5b43e63
commit
acdb8a19a6
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user