mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Simplify GenericLog() for C/C++.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6391 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -86,18 +86,21 @@ enum LOG_LEVELS {
|
|||||||
LDEBUG = DEBUG_LEVEL,
|
LDEBUG = DEBUG_LEVEL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define LOGTYPES_LEVELS LogTypes::LOG_LEVELS
|
||||||
|
#define LOGTYPES_TYPE LogTypes::LOG_TYPE
|
||||||
|
#else
|
||||||
|
#define LOGTYPES_LEVELS enum LOG_LEVELS
|
||||||
|
#define LOGTYPES_TYPE enum LOG_TYPE
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
|
||||||
const char *file, int line, const char *fmt, ...);
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
void GenericLogC(int level, int type,
|
void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type,
|
||||||
const char *file, int line, const char *fmt, ...);
|
const char *file, int line, const char *fmt, ...);
|
||||||
#ifndef __cplusplus
|
|
||||||
#define GenericLog GenericLogC
|
|
||||||
#endif
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -23,18 +23,6 @@
|
|||||||
#include "Thread.h"
|
#include "Thread.h"
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
|
|
||||||
void GenericLogC(int level, int type,
|
|
||||||
const char *file, int line, const char* fmt, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
va_start(args, fmt);
|
|
||||||
if (LogManager::GetInstance())
|
|
||||||
LogManager::GetInstance()->Log(
|
|
||||||
(LogTypes::LOG_LEVELS)level, (LogTypes::LOG_TYPE)type,
|
|
||||||
file, line, fmt, args);
|
|
||||||
va_end(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||||
const char *file, int line, const char* fmt, ...)
|
const char *file, int line, const char* fmt, ...)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user