trying diffrent way to prevent logging of files when CAUDIO_USE_MMGR isnt defined
This commit is contained in:
parent
6534bc16bf
commit
5599cdadf3
|
@ -254,8 +254,10 @@ static void doCleanupLogOnFirstRun();
|
|||
// Local functions only
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
static void log(const char *format, ...)
|
||||
{
|
||||
#ifdef CAUDIO_USE_MMGR
|
||||
// Cleanup the log?
|
||||
|
||||
if (cleanupLogOnFirstRun) doCleanupLogOnFirstRun();
|
||||
|
@ -282,8 +284,10 @@ static void log(const char *format, ...)
|
|||
|
||||
fprintf(fp, "%s\r\n", buffer);
|
||||
fclose(fp);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
static void doCleanupLogOnFirstRun()
|
||||
|
@ -531,6 +535,7 @@ static void dumpAllocations(FILE *fp)
|
|||
|
||||
static void dumpLeakReport()
|
||||
{
|
||||
#ifdef CAUDIO_USE_MMGR
|
||||
// Open the report file
|
||||
|
||||
FILE *fp = fopen(memoryLeakLogFile, "w+b");
|
||||
|
@ -583,6 +588,7 @@ static void dumpLeakReport()
|
|||
}
|
||||
|
||||
fclose(fp);
|
||||
#endif
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -5,10 +5,11 @@
|
|||
#include <cstring>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef CAUDIO_USE_MMGR
|
||||
#ifndef CAUDIO_USE_MMGR
|
||||
#include "../Headers/cMemoryManager.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "../Headers/cMemorySource.h"
|
||||
|
||||
namespace cAudio
|
||||
|
|
Loading…
Reference in New Issue