From 3200eae9b19dea6e9e1a4550b06acbf27ffc2f7a Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 8 Mar 2018 13:18:51 +0100 Subject: [PATCH] Don't use short version of 'tinyformat/fmt' namespace in util.h (#1975) * Don't use short version of 'tinyformat/fmt' namespace in util.h Clion is not able to parse this correctly and messes up all the syntax checks, marking large parts of C++ files as syntactically invalid, making it hard to find real syntax errors without trying compilation. * Also use full namespace name for strprintf in tinyformat.h --- src/tinyformat.h | 2 +- src/util.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tinyformat.h b/src/tinyformat.h index 17f0360c42..db7641302e 100644 --- a/src/tinyformat.h +++ b/src/tinyformat.h @@ -1044,6 +1044,6 @@ std::string format(const std::string &fmt, const Args&... args) } // namespace tinyformat -#define strprintf tfm::format +#define strprintf tinyformat::format #endif // TINYFORMAT_H_INCLUDED diff --git a/src/util.h b/src/util.h index c6a89fd8c5..468613100e 100644 --- a/src/util.h +++ b/src/util.h @@ -96,18 +96,18 @@ int LogPrintStr(const std::string &str); #define LogPrint(category, ...) do { \ if (LogAcceptCategory((category))) { \ - LogPrintStr(tfm::format(__VA_ARGS__)); \ + LogPrintStr(tinyformat::format(__VA_ARGS__)); \ } \ } while(0) #define LogPrintf(...) do { \ - LogPrintStr(tfm::format(__VA_ARGS__)); \ + LogPrintStr(tinyformat::format(__VA_ARGS__)); \ } while(0) template bool error(const char* fmt, const Args&... args) { - LogPrintStr("ERROR: " + tfm::format(fmt, args...) + "\n"); + LogPrintStr("ERROR: " + tinyformat::format(fmt, args...) + "\n"); return false; }