Remove the unused dllname parameter to the trace function

This commit is contained in:
Martin Storsjö 2014-01-24 12:00:03 +02:00
parent fcd7a13816
commit 1f5d786d6a
5 changed files with 0 additions and 78 deletions

View File

@ -43,13 +43,7 @@ void WelsStderrSetTraceLevel (int32_t level);
int32_t welsStderrLevelTrace (int32_t level, const str_t* format, va_list ap);
template<int level> int32_t welsStderrTrace (
#ifndef WIN32
const str_t* dllname,
#endif
const str_t* format, ...) {
#ifndef WIN32
(void)dllname; // Unused.
#endif
va_list ap;
va_start (ap, format);
welsStderrLevelTrace (level, format, ap);

View File

@ -39,11 +39,7 @@
//using namespace WelsDec;
namespace WelsDec {
#ifdef _WIN32
typedef int (*CM_WELS_TRACE) (const char* kpFormat, ...);
#else
typedef int (*CM_WELS_TRACE) (const char* kpDllName, const char* kpFormat, ...);
#endif
typedef enum {

View File

@ -322,7 +322,6 @@ int32_t CWelsCodecTrace::WriteString (int32_t iLevel, const str_t* pStr) {
if (m_hTraceHandle)
#endif
{
#ifdef _WIN32
switch (iLevel) {
case WELS_LOG_ERROR:
if (m_fpErrorTrace)
@ -345,30 +344,6 @@ int32_t CWelsCodecTrace::WriteString (int32_t iLevel, const str_t* pStr) {
m_fpDebugTrace ("%s", pStr);
break;
}
#else
switch (iLevel) {
case WELS_LOG_ERROR:
if (m_fpErrorTrace)
m_fpErrorTrace ("CODEC", "%s", pStr);
break;
case WELS_LOG_WARNING:
if (m_fpWarnTrace)
m_fpWarnTrace ("CODEC", "%s", pStr);
break;
case WELS_LOG_INFO:
if (m_fpInfoTrace)
m_fpInfoTrace ("CODEC", "%s", pStr);
break;
case WELS_LOG_DEBUG:
if (m_fpInfoTrace)
m_fpInfoTrace ("CODEC", "%s", pStr);
break;
default:
if (m_fpInfoTrace)
m_fpInfoTrace ("CODEC", "%s", pStr);
break;
}
#endif
}
return 0;

View File

@ -36,11 +36,7 @@
#include <stdarg.h>
#include "typedefs.h"
#ifdef _WIN32
typedef int32_t (*CM_WELS_TRACE) (const str_t* format, ...);
#else
typedef int32_t (*CM_WELS_TRACE2) (const str_t* dllname, const str_t* format, ...);
#endif
class welsCodecTrace {
public:
@ -60,17 +56,10 @@ class welsCodecTrace {
public:
static int32_t m_iTraceLevel;
#if defined _WIN32
static CM_WELS_TRACE m_fpDebugTrace;
static CM_WELS_TRACE m_fpInfoTrace;
static CM_WELS_TRACE m_fpWarnTrace;
static CM_WELS_TRACE m_fpErrorTrace;
#else
static CM_WELS_TRACE2 m_fpDebugTrace;
static CM_WELS_TRACE2 m_fpInfoTrace;
static CM_WELS_TRACE2 m_fpWarnTrace;
static CM_WELS_TRACE2 m_fpErrorTrace;
#endif
};

View File

@ -137,17 +137,10 @@ static void* GetProcessAddress (CFBundleRef bundle, const str_t* lpszprocname) {
#endif
int32_t welsCodecTrace::m_iTraceLevel = WELS_LOG_DEFAULT;
#if defined(_WIN32)
CM_WELS_TRACE welsCodecTrace::m_fpDebugTrace = NULL;
CM_WELS_TRACE welsCodecTrace::m_fpInfoTrace = NULL;
CM_WELS_TRACE welsCodecTrace::m_fpWarnTrace = NULL;
CM_WELS_TRACE welsCodecTrace::m_fpErrorTrace = NULL;
#else
CM_WELS_TRACE2 welsCodecTrace::m_fpDebugTrace = NULL;
CM_WELS_TRACE2 welsCodecTrace::m_fpInfoTrace = NULL;
CM_WELS_TRACE2 welsCodecTrace::m_fpWarnTrace = NULL;
CM_WELS_TRACE2 welsCodecTrace::m_fpErrorTrace = NULL;
#endif//WIN32
welsCodecTrace::welsCodecTrace() {
m_hTraceHandle = NULL;
@ -272,7 +265,6 @@ int32_t welsCodecTrace::WelsTraceModuleIsExist() {
}
void welsCodecTrace::TraceString (int32_t iLevel, const str_t* str) {
#ifdef _WIN32
switch (iLevel) {
case WELS_LOG_ERROR:
if (m_fpErrorTrace)
@ -295,30 +287,6 @@ void welsCodecTrace::TraceString (int32_t iLevel, const str_t* str) {
m_fpInfoTrace ("%s", str);
break;
}
#else
switch (iLevel) {
case WELS_LOG_ERROR:
if (m_fpErrorTrace)
m_fpErrorTrace ("CODEC", "%s", str);
break;
case WELS_LOG_WARNING:
if (m_fpWarnTrace)
m_fpWarnTrace ("CODEC", "%s", str);
break;
case WELS_LOG_INFO:
if (m_fpInfoTrace)
m_fpInfoTrace ("CODEC", "%s", str);
break;
case WELS_LOG_DEBUG:
if (m_fpInfoTrace)
m_fpInfoTrace ("CODEC", "%s", str);
break;
default:
if (m_fpInfoTrace)
m_fpInfoTrace ("CODEC", "%s", str);
break;
}
#endif
}
#define MAX_LOG_SIZE 1024