Silence false positive clang-tidy warnings in log.hpp.
This commit is contained in:
parent
a237d74a81
commit
0596406113
|
@ -23,7 +23,7 @@
|
||||||
namespace mastodonpp
|
namespace mastodonpp
|
||||||
{
|
{
|
||||||
|
|
||||||
using std::cerr;
|
using std::cerr; // NOLINT(misc-unused-using-decls)
|
||||||
using std::string_view;
|
using std::string_view;
|
||||||
|
|
||||||
//! @private
|
//! @private
|
||||||
|
@ -40,13 +40,16 @@ constexpr auto shorten_filename(const string_view &filename)
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||||
#define commonlog cerr << '[' << shorten_filename(__FILE__) \
|
#define commonlog cerr << '[' << shorten_filename(__FILE__) \
|
||||||
<< ':' << __LINE__ << ']'
|
<< ':' << __LINE__ << ']'
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||||
#define debuglog commonlog << " DEBUG: "
|
#define debuglog commonlog << " DEBUG: "
|
||||||
#else
|
#else
|
||||||
#define debuglog false && cerr
|
#define debuglog false && cerr
|
||||||
#endif
|
#endif
|
||||||
|
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||||
#define errorlog commonlog << " ERROR: "
|
#define errorlog commonlog << " ERROR: "
|
||||||
|
|
||||||
} // namespace mastodonpp
|
} // namespace mastodonpp
|
||||||
|
|
Loading…
Reference in New Issue