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
This commit is contained in:
parent
97a07cbc4c
commit
3200eae9b1
@ -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
|
||||
|
@ -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<typename... Args>
|
||||
bool error(const char* fmt, const Args&... args)
|
||||
{
|
||||
LogPrintStr("ERROR: " + tfm::format(fmt, args...) + "\n");
|
||||
LogPrintStr("ERROR: " + tinyformat::format(fmt, args...) + "\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user