mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
This commit is contained in:
@@ -22,7 +22,7 @@ void AOSound::SoundLoop()
|
||||
format.rate = m_mixer->GetSampleRate();
|
||||
format.byte_format = AO_FMT_LITTLE;
|
||||
|
||||
device = ao_open_live(default_driver, &format, NULL /* no options */);
|
||||
device = ao_open_live(default_driver, &format, nullptr /* no options */);
|
||||
if (!device)
|
||||
{
|
||||
PanicAlertT("AudioCommon: Error opening AO device.\n");
|
||||
@@ -73,7 +73,7 @@ void AOSound::Stop()
|
||||
|
||||
ao_shutdown();
|
||||
|
||||
device = NULL;
|
||||
device = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#define BUFFER_SIZE_MAX 8192
|
||||
#define BUFFER_SIZE_BYTES (BUFFER_SIZE_MAX*2*2)
|
||||
|
||||
AlsaSound::AlsaSound(CMixer *mixer) : SoundStream(mixer), thread_data(0), handle(NULL), frames_to_deliver(FRAME_COUNT_MIN)
|
||||
AlsaSound::AlsaSound(CMixer *mixer) : SoundStream(mixer), thread_data(0), handle(nullptr), frames_to_deliver(FRAME_COUNT_MIN)
|
||||
{
|
||||
mix_buffer = new u8[BUFFER_SIZE_BYTES];
|
||||
}
|
||||
@@ -204,11 +204,11 @@ bool AlsaSound::AlsaInit()
|
||||
|
||||
void AlsaSound::AlsaShutdown()
|
||||
{
|
||||
if (handle != NULL)
|
||||
if (handle != nullptr)
|
||||
{
|
||||
snd_pcm_drop(handle);
|
||||
snd_pcm_close(handle);
|
||||
handle = NULL;
|
||||
handle = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ bool CoreAudioSound::Start()
|
||||
desc.componentFlags = 0;
|
||||
desc.componentFlagsMask = 0;
|
||||
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
|
||||
component = FindNextComponent(NULL, &desc);
|
||||
if (component == NULL) {
|
||||
component = FindNextComponent(nullptr, &desc);
|
||||
if (component == nullptr) {
|
||||
ERROR_LOG(AUDIO, "error finding audio component");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ float* design_fir(unsigned int *n, float* fc, float opt)
|
||||
float fc1; // Cutoff frequencies
|
||||
|
||||
// Sanity check
|
||||
if(*n==0) return NULL;
|
||||
if(*n==0) return nullptr;
|
||||
MathUtil::Clamp(&fc[0],float(0.001),float(1));
|
||||
|
||||
float *w=(float*)calloc(sizeof(float),*n);
|
||||
@@ -188,7 +188,7 @@ void done(void)
|
||||
{
|
||||
free(filter_coefs_lfe);
|
||||
}
|
||||
filter_coefs_lfe = NULL;
|
||||
filter_coefs_lfe = nullptr;
|
||||
}
|
||||
|
||||
float* calc_coefficients_125Hz_lowpass(int rate)
|
||||
@@ -378,5 +378,5 @@ void dpl2reset()
|
||||
{
|
||||
olddelay = -1;
|
||||
oldfreq = 0;
|
||||
filter_coefs_lfe = NULL;
|
||||
filter_coefs_lfe = nullptr;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ bool DSound::CreateBuffer()
|
||||
dsbdesc.lpwfxFormat = (WAVEFORMATEX *)&pcmwf;
|
||||
dsbdesc.guid3DAlgorithm = DS3DALG_DEFAULT;
|
||||
|
||||
HRESULT res = ds->CreateSoundBuffer(&dsbdesc, &dsBuffer, NULL);
|
||||
HRESULT res = ds->CreateSoundBuffer(&dsbdesc, &dsBuffer, nullptr);
|
||||
if (SUCCEEDED(res))
|
||||
{
|
||||
dsBuffer->SetCurrentPosition(0);
|
||||
@@ -43,7 +43,7 @@ bool DSound::CreateBuffer()
|
||||
{
|
||||
// Failed.
|
||||
PanicAlertT("Sound buffer creation failed: %08x", res);
|
||||
dsBuffer = NULL;
|
||||
dsBuffer = nullptr;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ void DSound::SetVolume(int volume)
|
||||
// This is in "dBA attenuation" from 0 to -10000, logarithmic
|
||||
m_volume = (int)floor(log10((float)volume) * 5000.0f) - 10000;
|
||||
|
||||
if (dsBuffer != NULL)
|
||||
if (dsBuffer != nullptr)
|
||||
dsBuffer->SetVolume(m_volume);
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ void DSound::Clear(bool mute)
|
||||
{
|
||||
m_muted = mute;
|
||||
|
||||
if (dsBuffer != NULL)
|
||||
if (dsBuffer != nullptr)
|
||||
{
|
||||
if (m_muted)
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ bool OpenALStream::Start()
|
||||
ALCdevice *pDevice = alcOpenDevice(defDevName);
|
||||
if (pDevice)
|
||||
{
|
||||
ALCcontext *pContext = alcCreateContext(pDevice, NULL);
|
||||
ALCcontext *pContext = alcCreateContext(pDevice, nullptr);
|
||||
if (pContext)
|
||||
{
|
||||
// Used to determine an appropriate period size (2x period = total buffer size)
|
||||
@@ -83,7 +83,7 @@ void OpenALStream::Stop()
|
||||
ALCcontext *pContext = alcGetCurrentContext();
|
||||
ALCdevice *pDevice = alcGetContextsDevice(pContext);
|
||||
|
||||
alcMakeContextCurrent(NULL);
|
||||
alcMakeContextCurrent(nullptr);
|
||||
alcDestroyContext(pContext);
|
||||
alcCloseDevice(pDevice);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class OpenALStream: public SoundStream
|
||||
{
|
||||
#if defined HAVE_OPENAL && HAVE_OPENAL
|
||||
public:
|
||||
OpenALStream(CMixer *mixer, void *hWnd = NULL)
|
||||
OpenALStream(CMixer *mixer, void *hWnd = nullptr)
|
||||
: SoundStream(mixer)
|
||||
, uiSource(0)
|
||||
{}
|
||||
|
||||
@@ -17,7 +17,7 @@ static SLEngineItf engineEngine;
|
||||
static SLObjectItf outputMixObject;
|
||||
|
||||
// buffer queue player interfaces
|
||||
static SLObjectItf bqPlayerObject = NULL;
|
||||
static SLObjectItf bqPlayerObject = nullptr;
|
||||
static SLPlayItf bqPlayerPlay;
|
||||
static SLAndroidSimpleBufferQueueItf bqPlayerBufferQueue;
|
||||
static SLMuteSoloItf bqPlayerMuteSolo;
|
||||
@@ -32,7 +32,7 @@ static int curBuffer = 0;
|
||||
|
||||
static void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) {
|
||||
assert(bq == bqPlayerBufferQueue);
|
||||
assert(NULL == context);
|
||||
assert(nullptr == context);
|
||||
|
||||
short *nextBuffer = buffer[curBuffer];
|
||||
int nextSize = sizeof(buffer[0]);
|
||||
@@ -53,7 +53,7 @@ bool OpenSLESStream::Start()
|
||||
{
|
||||
SLresult result;
|
||||
// create engine
|
||||
result = slCreateEngine(&engineObject, 0, NULL, 0, NULL, NULL);
|
||||
result = slCreateEngine(&engineObject, 0, nullptr, 0, nullptr, nullptr);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
result = (*engineObject)->Realize(engineObject, SL_BOOLEAN_FALSE);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
@@ -79,7 +79,7 @@ bool OpenSLESStream::Start()
|
||||
|
||||
// configure audio sink
|
||||
SLDataLocator_OutputMix loc_outmix = {SL_DATALOCATOR_OUTPUTMIX, outputMixObject};
|
||||
SLDataSink audioSnk = {&loc_outmix, NULL};
|
||||
SLDataSink audioSnk = {&loc_outmix, nullptr};
|
||||
|
||||
// create audio player
|
||||
const SLInterfaceID ids[2] = {SL_IID_BUFFERQUEUE, SL_IID_VOLUME};
|
||||
@@ -94,7 +94,7 @@ bool OpenSLESStream::Start()
|
||||
result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_BUFFERQUEUE,
|
||||
&bqPlayerBufferQueue);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
result = (*bqPlayerBufferQueue)->RegisterCallback(bqPlayerBufferQueue, bqPlayerCallback, NULL);
|
||||
result = (*bqPlayerBufferQueue)->RegisterCallback(bqPlayerBufferQueue, bqPlayerCallback, nullptr);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_PLAYING);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
@@ -113,22 +113,22 @@ bool OpenSLESStream::Start()
|
||||
|
||||
void OpenSLESStream::Stop()
|
||||
{
|
||||
if (bqPlayerObject != NULL) {
|
||||
if (bqPlayerObject != nullptr) {
|
||||
(*bqPlayerObject)->Destroy(bqPlayerObject);
|
||||
bqPlayerObject = NULL;
|
||||
bqPlayerPlay = NULL;
|
||||
bqPlayerBufferQueue = NULL;
|
||||
bqPlayerMuteSolo = NULL;
|
||||
bqPlayerVolume = NULL;
|
||||
bqPlayerObject = nullptr;
|
||||
bqPlayerPlay = nullptr;
|
||||
bqPlayerBufferQueue = nullptr;
|
||||
bqPlayerMuteSolo = nullptr;
|
||||
bqPlayerVolume = nullptr;
|
||||
}
|
||||
if (outputMixObject != NULL) {
|
||||
if (outputMixObject != nullptr) {
|
||||
(*outputMixObject)->Destroy(outputMixObject);
|
||||
outputMixObject = NULL;
|
||||
outputMixObject = nullptr;
|
||||
}
|
||||
if (engineObject != NULL) {
|
||||
if (engineObject != nullptr) {
|
||||
(*engineObject)->Destroy(engineObject);
|
||||
engineObject = NULL;
|
||||
engineEngine = NULL;
|
||||
engineObject = nullptr;
|
||||
engineEngine = nullptr;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@ class OpenSLESStream : public SoundStream
|
||||
{
|
||||
#ifdef ANDROID
|
||||
public:
|
||||
OpenSLESStream(CMixer *mixer, void *hWnd = NULL)
|
||||
OpenSLESStream(CMixer *mixer, void *hWnd = nullptr)
|
||||
: SoundStream(mixer)
|
||||
{};
|
||||
|
||||
@@ -27,6 +27,6 @@ private:
|
||||
Common::Event soundSyncEvent;
|
||||
#else
|
||||
public:
|
||||
OpenSLESStream(CMixer *mixer, void *hWnd = NULL): SoundStream(mixer) {}
|
||||
OpenSLESStream(CMixer *mixer, void *hWnd = nullptr): SoundStream(mixer) {}
|
||||
#endif // HAVE_OPENSL
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@ void PulseAudio::SoundLoop()
|
||||
if (PulseInit())
|
||||
{
|
||||
while (m_run_thread.load() && m_pa_connected == 1 && m_pa_error >= 0)
|
||||
m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, NULL);
|
||||
m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, nullptr);
|
||||
|
||||
if(m_pa_error < 0)
|
||||
ERROR_LOG(AUDIO, "PulseAudio error: %s", pa_strerror(m_pa_error));
|
||||
@@ -66,12 +66,12 @@ bool PulseAudio::PulseInit()
|
||||
m_pa_ml = pa_mainloop_new();
|
||||
m_pa_mlapi = pa_mainloop_get_api(m_pa_ml);
|
||||
m_pa_ctx = pa_context_new(m_pa_mlapi, "dolphin-emu");
|
||||
m_pa_error = pa_context_connect(m_pa_ctx, NULL, PA_CONTEXT_NOFLAGS, NULL);
|
||||
m_pa_error = pa_context_connect(m_pa_ctx, nullptr, PA_CONTEXT_NOFLAGS, nullptr);
|
||||
pa_context_set_state_callback(m_pa_ctx, StateCallback, this);
|
||||
|
||||
// wait until we're connected to the pulseaudio server
|
||||
while (m_pa_connected == 0 && m_pa_error >= 0)
|
||||
m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, NULL);
|
||||
m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, nullptr);
|
||||
|
||||
if (m_pa_connected == 2 || m_pa_error < 0)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ bool PulseAudio::PulseInit()
|
||||
ss.format = PA_SAMPLE_S16LE;
|
||||
ss.channels = 2;
|
||||
ss.rate = m_mixer->GetSampleRate();
|
||||
m_pa_s = pa_stream_new(m_pa_ctx, "Playback", &ss, NULL);
|
||||
m_pa_s = pa_stream_new(m_pa_ctx, "Playback", &ss, nullptr);
|
||||
pa_stream_set_write_callback(m_pa_s, WriteCallback, this);
|
||||
pa_stream_set_underflow_callback(m_pa_s, UnderflowCallback, this);
|
||||
|
||||
@@ -97,7 +97,7 @@ bool PulseAudio::PulseInit()
|
||||
m_pa_ba.prebuf = -1; // start as early as possible
|
||||
m_pa_ba.tlength = BUFFER_SIZE; // designed latency, only change this flag for low latency output
|
||||
pa_stream_flags flags = pa_stream_flags(PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE);
|
||||
m_pa_error = pa_stream_connect_playback(m_pa_s, NULL, &m_pa_ba, flags, NULL, NULL);
|
||||
m_pa_error = pa_stream_connect_playback(m_pa_s, nullptr, &m_pa_ba, flags, nullptr, nullptr);
|
||||
if (m_pa_error < 0)
|
||||
{
|
||||
ERROR_LOG(AUDIO, "PulseAudio failed to initialize: %s", pa_strerror(m_pa_error));
|
||||
@@ -135,7 +135,7 @@ void PulseAudio::StateCallback(pa_context* c)
|
||||
void PulseAudio::UnderflowCallback(pa_stream* s)
|
||||
{
|
||||
m_pa_ba.tlength += BUFFER_SIZE;
|
||||
pa_stream_set_buffer_attr(s, &m_pa_ba, NULL, NULL);
|
||||
pa_stream_set_buffer_attr(s, &m_pa_ba, nullptr, nullptr);
|
||||
|
||||
WARN_LOG(AUDIO, "pulseaudio underflow, new latency: %d bytes", m_pa_ba.tlength);
|
||||
}
|
||||
@@ -150,7 +150,7 @@ void PulseAudio::WriteCallback(pa_stream* s, size_t length)
|
||||
return; // error will be printed from main loop
|
||||
|
||||
m_mixer->Mix((s16*) buffer, length / sizeof(s16) / CHANNEL_COUNT);
|
||||
m_pa_error = pa_stream_write(s, buffer, length, NULL, 0, PA_SEEK_RELATIVE);
|
||||
m_pa_error = pa_stream_write(s, buffer, length, nullptr, 0, PA_SEEK_RELATIVE);
|
||||
}
|
||||
|
||||
// Callbacks that forward to internal methods (required because PulseAudio is a C API).
|
||||
|
||||
@@ -11,7 +11,7 @@ enum {BUF_SIZE = 32*1024};
|
||||
WaveFileWriter::WaveFileWriter():
|
||||
skip_silence(false),
|
||||
audio_size(0),
|
||||
conv_buffer(NULL)
|
||||
conv_buffer(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ XAudio2::XAudio2(CMixer *mixer)
|
||||
: SoundStream(mixer)
|
||||
, m_mastering_voice(nullptr)
|
||||
, m_volume(1.0f)
|
||||
, m_cleanup_com(SUCCEEDED(CoInitializeEx(NULL, COINIT_MULTITHREADED)))
|
||||
, m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED)))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ XAudio2_7::XAudio2_7(CMixer *mixer)
|
||||
: SoundStream(mixer)
|
||||
, m_mastering_voice(nullptr)
|
||||
, m_volume(1.0f)
|
||||
, m_cleanup_com(SUCCEEDED(CoInitializeEx(NULL, COINIT_MULTITHREADED)))
|
||||
, m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED)))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -50,13 +50,13 @@ ALDeviceList::ALDeviceList()
|
||||
defaultDeviceIndex = 0;
|
||||
|
||||
// grab function pointers for 1.0-API functions, and if successful proceed to enumerate all devices
|
||||
//if (LoadOAL10Library(NULL, &ALFunction) == TRUE) {
|
||||
if (alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT"))
|
||||
//if (LoadOAL10Library(nullptr, &ALFunction) == TRUE) {
|
||||
if (alcIsExtensionPresent(nullptr, "ALC_ENUMERATION_EXT"))
|
||||
{
|
||||
const char *devices = alcGetString(NULL, ALC_DEVICE_SPECIFIER);
|
||||
const char *defaultDeviceName = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
|
||||
// go through device list (each device terminated with a single NULL, list terminated with double NULL)
|
||||
for (s32 index = 0; devices != NULL && strlen(devices) > 0; index++, devices += strlen(devices) + 1)
|
||||
const char *devices = alcGetString(nullptr, ALC_DEVICE_SPECIFIER);
|
||||
const char *defaultDeviceName = alcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER);
|
||||
// go through device list (each device terminated with a single nullptr, list terminated with double nullptr)
|
||||
for (s32 index = 0; devices != nullptr && strlen(devices) > 0; index++, devices += strlen(devices) + 1)
|
||||
{
|
||||
if (strcmp(defaultDeviceName, devices) == 0)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ ALDeviceList::ALDeviceList()
|
||||
ALCdevice *device = alcOpenDevice(devices);
|
||||
if (device)
|
||||
{
|
||||
ALCcontext *context = alcCreateContext(device, NULL);
|
||||
ALCcontext *context = alcCreateContext(device, nullptr);
|
||||
if (context)
|
||||
{
|
||||
alcMakeContextCurrent(context);
|
||||
@@ -79,7 +79,7 @@ ALDeviceList::ALDeviceList()
|
||||
bNewName = false;
|
||||
}
|
||||
}
|
||||
if ((bNewName) && (actualDeviceName != NULL) && (strlen(actualDeviceName) > 0))
|
||||
if ((bNewName) && (actualDeviceName != nullptr) && (strlen(actualDeviceName) > 0))
|
||||
{
|
||||
ALDeviceInfo.bSelected = true;
|
||||
ALDeviceInfo.strDeviceName = actualDeviceName;
|
||||
@@ -120,7 +120,7 @@ ALDeviceList::ALDeviceList()
|
||||
|
||||
vDeviceInfo.push_back(ALDeviceInfo);
|
||||
}
|
||||
alcMakeContextCurrent(NULL);
|
||||
alcMakeContextCurrent(nullptr);
|
||||
alcDestroyContext(context);
|
||||
}
|
||||
alcCloseDevice(device);
|
||||
@@ -163,7 +163,7 @@ char * ALDeviceList::GetDeviceName(s32 index)
|
||||
if (index < GetNumDevices())
|
||||
return (char *)vDeviceInfo[index].strDeviceName.c_str();
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -14,7 +14,7 @@ const char procfile[] = "/proc/cpuinfo";
|
||||
char *GetCPUString()
|
||||
{
|
||||
const char marker[] = "Hardware\t: ";
|
||||
char *cpu_string = 0;
|
||||
char *cpu_string = nullptr;
|
||||
// Count the number of processor lines in /proc/cpuinfo
|
||||
char buf[1024];
|
||||
|
||||
@@ -38,7 +38,7 @@ char *GetCPUString()
|
||||
unsigned char GetCPUImplementer()
|
||||
{
|
||||
const char marker[] = "CPU implementer\t: ";
|
||||
char *implementer_string = 0;
|
||||
char *implementer_string = nullptr;
|
||||
unsigned char implementer = 0;
|
||||
char buf[1024];
|
||||
|
||||
@@ -65,7 +65,7 @@ unsigned char GetCPUImplementer()
|
||||
unsigned short GetCPUPart()
|
||||
{
|
||||
const char marker[] = "CPU part\t: ";
|
||||
char *part_string = 0;
|
||||
char *part_string = nullptr;
|
||||
unsigned short part = 0;
|
||||
char buf[1024];
|
||||
|
||||
@@ -105,11 +105,11 @@ bool CheckCPUFeature(const char *feature)
|
||||
continue;
|
||||
char *featurestring = buf + sizeof(marker) - 1;
|
||||
char *token = strtok(featurestring, " ");
|
||||
while (token != NULL)
|
||||
while (token != nullptr)
|
||||
{
|
||||
if (strstr(token, feature))
|
||||
return true;
|
||||
token = strtok(NULL, " ");
|
||||
token = strtok(nullptr, " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -710,7 +710,7 @@ protected:
|
||||
size_t region_size;
|
||||
|
||||
public:
|
||||
ARMXCodeBlock() : region(NULL), region_size(0) {}
|
||||
ARMXCodeBlock() : region(nullptr), region_size(0) {}
|
||||
virtual ~ARMXCodeBlock() { if (region) FreeCodeSpace(); }
|
||||
|
||||
// Call this before you generate any code.
|
||||
@@ -735,7 +735,7 @@ public:
|
||||
{
|
||||
#ifndef __SYMBIAN32__
|
||||
FreeMemoryPages(region, region_size);
|
||||
region = NULL;
|
||||
region = nullptr;
|
||||
#endif
|
||||
region_size = 0;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ void MemChecks::AddFromStrings(const TMemChecksStr& mcstrs)
|
||||
|
||||
void MemChecks::Add(const TMemCheck& _rMemoryCheck)
|
||||
{
|
||||
if (GetMemCheck(_rMemoryCheck.StartAddress) == 0)
|
||||
if (GetMemCheck(_rMemoryCheck.StartAddress) == nullptr)
|
||||
m_MemChecks.push_back(_rMemoryCheck);
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ TMemCheck *MemChecks::GetMemCheck(u32 address)
|
||||
}
|
||||
|
||||
// none found
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bool write, int size, u32 pc)
|
||||
|
||||
@@ -41,7 +41,7 @@ std::vector<std::string> cdio_get_devices()
|
||||
{
|
||||
std::vector<std::string> drives;
|
||||
|
||||
const DWORD buffsize = GetLogicalDriveStrings(0, NULL);
|
||||
const DWORD buffsize = GetLogicalDriveStrings(0, nullptr);
|
||||
std::vector<TCHAR> buff(buffsize);
|
||||
if (GetLogicalDriveStrings(buffsize, buff.data()) == buffsize - 1)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ std::vector<std::string> cdio_get_devices()
|
||||
return( drives );
|
||||
|
||||
classes_to_match = IOServiceMatching( kIOCDMediaClass );
|
||||
if( classes_to_match == NULL )
|
||||
if( classes_to_match == nullptr )
|
||||
return( drives );
|
||||
|
||||
CFDictionarySetValue( classes_to_match,
|
||||
@@ -101,7 +101,7 @@ std::vector<std::string> cdio_get_devices()
|
||||
IORegistryEntryCreateCFProperty( next_media,
|
||||
CFSTR( kIOBSDNameKey ), kCFAllocatorDefault,
|
||||
0 );
|
||||
if( str_bsd_path == NULL )
|
||||
if( str_bsd_path == nullptr )
|
||||
{
|
||||
IOObjectRelease( next_media );
|
||||
continue;
|
||||
@@ -118,7 +118,7 @@ std::vector<std::string> cdio_get_devices()
|
||||
sizeof(psz_buf) - dev_path_length,
|
||||
kCFStringEncodingASCII))
|
||||
{
|
||||
if(psz_buf != NULL)
|
||||
if(psz_buf != nullptr)
|
||||
{
|
||||
std::string str = psz_buf;
|
||||
drives.push_back(str);
|
||||
@@ -151,7 +151,7 @@ static struct
|
||||
{ "/dev/acd%d", 0, 27 },
|
||||
{ "/dev/cd%d", 0, 27 },
|
||||
#endif
|
||||
{ NULL, 0, 0 }
|
||||
{ nullptr, 0, 0 }
|
||||
};
|
||||
|
||||
// Returns true if a device is a block or char device and not a symbolic link
|
||||
@@ -196,7 +196,7 @@ std::vector<std::string> cdio_get_devices ()
|
||||
for (unsigned int j = checklist[i].num_min; j <= checklist[i].num_max; ++j)
|
||||
{
|
||||
std::string drive = StringFromFormat(checklist[i].format, j);
|
||||
if (is_cdrom(drive, NULL))
|
||||
if (is_cdrom(drive, nullptr))
|
||||
{
|
||||
drives.push_back(std::move(drive));
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
void DoLinkedList(LinkedListItem<T>*& list_start, LinkedListItem<T>** list_end=0)
|
||||
{
|
||||
LinkedListItem<T>* list_cur = list_start;
|
||||
LinkedListItem<T>* prev = 0;
|
||||
LinkedListItem<T>* prev = nullptr;
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
{
|
||||
if (mode == MODE_READ)
|
||||
{
|
||||
cur->next = 0;
|
||||
cur->next = nullptr;
|
||||
list_cur = cur;
|
||||
if (prev)
|
||||
prev->next = cur;
|
||||
@@ -239,13 +239,13 @@ public:
|
||||
if (mode == MODE_READ)
|
||||
{
|
||||
if (prev)
|
||||
prev->next = 0;
|
||||
prev->next = nullptr;
|
||||
if (list_end)
|
||||
*list_end = prev;
|
||||
if (list_cur)
|
||||
{
|
||||
if (list_start == list_cur)
|
||||
list_start = 0;
|
||||
list_start = nullptr;
|
||||
do
|
||||
{
|
||||
LinkedListItem<T>* next = list_cur->next;
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
}
|
||||
|
||||
// Get data
|
||||
u8 *ptr = 0;
|
||||
u8 *ptr = nullptr;
|
||||
PointerWrap p(&ptr, PointerWrap::MODE_MEASURE);
|
||||
_class.DoState(p);
|
||||
size_t const sz = (size_t)ptr;
|
||||
|
||||
@@ -127,7 +127,7 @@ inline u64 _rotr64(u64 x, unsigned int shift){
|
||||
// Restore the global locale
|
||||
_configthreadlocale(_DISABLE_PER_THREAD_LOCALE);
|
||||
}
|
||||
else if(new_locale != NULL)
|
||||
else if(new_locale != nullptr)
|
||||
{
|
||||
// Configure the thread to set the locale only for this thread
|
||||
_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user