Make internal assert method inline

This commit is contained in:
DankParrot 2020-08-22 18:48:59 -07:00
parent e37883a9bb
commit e91c2d9b50
1 changed files with 2 additions and 2 deletions

View File

@ -161,14 +161,14 @@ namespace Feather::Log
// Prints message for a failed assertion. Use the Assert or AssertOnce macros instead of calling this directly.
template <class S, typename... Args>
void LogAssert(ChannelID channel, const char* file, uint64_t lineNum, const char* expr, const S& fmt, Args... args)
inline void LogAssert(ChannelID channel, const char* file, uint64_t lineNum, const char* expr, const S& fmt, Args... args)
{
std::string msg = fmt::format("{} ({}): {}", file, lineNum, fmt);
Log(channel, Level::Assert, msg, args...);
}
// Prints message for a failed assertion. Use the Assert or AssertOnce macros instead of calling this directly.
void LogAssert(ChannelID channel, const char* file, uint64_t lineNum, const char* expr)
inline void LogAssert(ChannelID channel, const char* file, uint64_t lineNum, const char* expr)
{
// When no message is provided we print the asserted expression instead
Log(channel, Level::Assert, "{} ({}): Assertion failed: {}", file, lineNum, expr);