ref: 1f5d786d6a99173cb4b6d6f6c2447b782d4cf7d2
parent: fcd7a13816a7141236e1f66d7dfaa8f44c45d78a
author: Martin Storsjö <martin@martin.st>
date: Fri Jan 24 07:00:03 EST 2014
Remove the unused dllname parameter to the trace function
--- a/codec/common/logging.h
+++ b/codec/common/logging.h
@@ -43,13 +43,7 @@
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);
--- a/codec/decoder/plus/inc/welsCodecTrace.h
+++ b/codec/decoder/plus/inc/welsCodecTrace.h
@@ -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 {
--- a/codec/decoder/plus/src/welsCodecTrace.cpp
+++ b/codec/decoder/plus/src/welsCodecTrace.cpp
@@ -322,7 +322,6 @@
if (m_hTraceHandle)
#endif
{
-#ifdef _WIN32
switch (iLevel) {
case WELS_LOG_ERROR:
if (m_fpErrorTrace)
@@ -345,30 +344,6 @@
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;
--- a/codec/encoder/plus/inc/welsCodecTrace.h
+++ b/codec/encoder/plus/inc/welsCodecTrace.h
@@ -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 @@
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
};
--- a/codec/encoder/plus/src/welsCodecTrace.cpp
+++ b/codec/encoder/plus/src/welsCodecTrace.cpp
@@ -137,17 +137,10 @@
#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 @@
}
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 @@
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