Only enable profiler when DEBUG is set

This commit is contained in:
Dimitris Panokostas 2017-04-19 01:31:57 +02:00
parent 134c7bdc3a
commit 78ed4b85e4
5 changed files with 13 additions and 9 deletions

View file

@ -50,7 +50,11 @@
#include "cia.h"
#include "inputdevice.h"
#include "audio.h"
#ifdef DEBUG
#include <gperftools/profiler.h>
#endif
#ifdef JIT
#include "jit/compemu.h"
#include <signal.h>

View file

@ -508,8 +508,7 @@ void ReadDirectory(const char* path, vector<string>* dirs, vector<string>* files
if (files != nullptr)
files->clear();
dir = opendir(path);
if (dir != nullptr)
if ((dir = opendir(path)) != nullptr)
{
while ((dent = readdir(dir)) != nullptr)
{
@ -527,9 +526,9 @@ void ReadDirectory(const char* path, vector<string>* dirs, vector<string>* files
}
if (dirs != nullptr)
std::sort(dirs->begin(), dirs->end());
sort(dirs->begin(), dirs->end());
if (files != nullptr)
std::sort(files->begin(), files->end());
sort(files->begin(), files->end());
}
void saveAdfDir()