Skip to content

Commit

Permalink
using char*
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Nov 16, 2024
1 parent 44c87e1 commit 8c31c34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions support/ppPrint.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ namespace pumipic {
#define ACTIVE_GPU_EXECUTION
#endif

template<typename STRING, typename... Args>
void pPrintError(const STRING fmt, const Args&... args) {
template<typename... Args>
void pPrintError(const char* fmt, const Args&... args) {
#if defined(SPDLOG_ENABLED) && defined(PP_PRINT_ENABLED)
spdlog::error("{}", fmt::sprintf(fmt, args...));
#elif defined(PP_PRINT_ENABLED)
fprintf(stderr, fmt, args...);
#endif
}

template<typename STRING, typename... Args>
template<typename... Args>
PP_INLINE
void pPrintInfo(const STRING fmt, const Args&... args) {
void pPrintInfo(const char* fmt, const Args&... args) {
#if defined(SPDLOG_ENABLED) && defined(PP_PRINT_ENABLED) && !defined(ACTIVE_GPU_EXECUTION)
spdlog::info("{}", fmt::sprintf(fmt, args...));
#elif defined(PP_PRINT_ENABLED)
Expand Down

0 comments on commit 8c31c34

Please sign in to comment.