logging fix

This commit is contained in:
Madthijs
2021-05-04 18:11:03 +02:00
parent 2277d1340c
commit b96acad0ca
4 changed files with 13 additions and 20 deletions

View File

@@ -15,24 +15,9 @@ struct IGpLogDriver
virtual void VPrintf(Category category, const char *fmt, va_list args) = 0;
virtual void Shutdown() = 0;
#ifdef __MACOS__
template <typename C, typename F, typename... T>
void Printf(C category, F *fmt, T... t);
#else
void Printf(Category category, const char *fmt, ...);
#endif
};
//this is temp, but args lose their types for some reason, garbling output
#ifdef __MACOS__
template <typename C, typename F, typename... T>
inline void IGpLogDriver::Printf(C category, F *fmt, T... t)
{
printf(fmt, t...);
printf("\n");
}
#else
inline void IGpLogDriver::Printf(Category category, const char *fmt, ...)
{
va_list args;
@@ -40,4 +25,3 @@ inline void IGpLogDriver::Printf(Category category, const char *fmt, ...)
this->VPrintf(category, fmt, args);
va_end(args);
}
#endif