General: Replace NULL and '0' usages with nullptr where applicable

This commit is contained in:
Lioncash 2015-09-11 14:50:10 -04:00
parent 506ab06238
commit 60b3fc01a2
11 changed files with 38 additions and 38 deletions

View file

@ -12,7 +12,7 @@ class CallstackWidget : public QDockWidget
Q_OBJECT
public:
CallstackWidget(QWidget* parent = 0);
CallstackWidget(QWidget* parent = nullptr);
public slots:
void OnDebugModeEntered();

View file

@ -37,7 +37,7 @@ class GPUCommandStreamWidget : public QDockWidget
Q_OBJECT
public:
GPUCommandStreamWidget(QWidget* parent = 0);
GPUCommandStreamWidget(QWidget* parent = nullptr);
private:
};

View file

@ -41,7 +41,7 @@ class GPUCommandListWidget : public QDockWidget
Q_OBJECT
public:
GPUCommandListWidget(QWidget* parent = 0);
GPUCommandListWidget(QWidget* parent = nullptr);
public slots:
void OnToggleTracing();

View file

@ -37,7 +37,7 @@ class ProfilerWidget : public QDockWidget
Q_OBJECT
public:
ProfilerWidget(QWidget* parent = 0);
ProfilerWidget(QWidget* parent = nullptr);
private slots:
void setProfilingInfoUpdateEnabled(bool enable);

View file

@ -9,7 +9,7 @@ class GRamView : public QHexEdit
Q_OBJECT
public:
GRamView(QWidget* parent = NULL);
GRamView(QWidget* parent = nullptr);
public slots:
void OnCPUStepped();

View file

@ -15,7 +15,7 @@ class RegistersWidget : public QDockWidget
Q_OBJECT
public:
RegistersWidget(QWidget* parent = NULL);
RegistersWidget(QWidget* parent = nullptr);
public slots:
void OnDebugModeEntered();

View file

@ -47,7 +47,7 @@ class GHotkeysDialog : public QDialog
Q_OBJECT
public:
GHotkeysDialog(QWidget* parent = NULL);
GHotkeysDialog(QWidget* parent = nullptr);
private:
Ui::hotkeys ui;

View file

@ -206,7 +206,7 @@ static const char *opcode_names[] = {
"swi",
"tst",
NULL
nullptr
};
// Indexed by the shift type (bits 6-5)
@ -399,7 +399,7 @@ std::string ARM_Disasm::Disassemble(u32 addr, u32 insn)
default:
return "Error";
}
return NULL;
return nullptr;
}
std::string ARM_Disasm::DisassembleALU(Opcode opcode, u32 insn)

View file

@ -299,7 +299,7 @@ static u32 vfp_double_fsqrt(ARMul_State* state, int dd, int unused, int dm, u32
vdp = &vdd;
if (tm & VFP_NAN)
ret = vfp_propagate_nan(vdp, &vdm, NULL, fpscr);
ret = vfp_propagate_nan(vdp, &vdm, nullptr, fpscr);
else if (vdm.sign == 0) {
sqrt_copy:
vdp = &vdm;
@ -700,26 +700,26 @@ static struct op fops_ext[] = {
{ vfp_double_fabs, 0 }, //0x00000001 - FEXT_FABS
{ vfp_double_fneg, 0 }, //0x00000002 - FEXT_FNEG
{ vfp_double_fsqrt, 0 }, //0x00000003 - FEXT_FSQRT
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ vfp_double_fcmp, OP_SCALAR }, //0x00000008 - FEXT_FCMP
{ vfp_double_fcmpe, OP_SCALAR }, //0x00000009 - FEXT_FCMPE
{ vfp_double_fcmpz, OP_SCALAR }, //0x0000000A - FEXT_FCMPZ
{ vfp_double_fcmpez, OP_SCALAR }, //0x0000000B - FEXT_FCMPEZ
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ vfp_double_fcvts, OP_SCALAR|OP_DD }, //0x0000000F - FEXT_FCVT
{ vfp_double_fuito, OP_SCALAR|OP_SM }, //0x00000010 - FEXT_FUITO
{ vfp_double_fsito, OP_SCALAR|OP_SM }, //0x00000011 - FEXT_FSITO
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ vfp_double_ftoui, OP_SCALAR|OP_SD }, //0x00000018 - FEXT_FTOUI
{ vfp_double_ftouiz, OP_SCALAR|OP_SD }, //0x00000019 - FEXT_FTOUIZ
{ vfp_double_ftosi, OP_SCALAR|OP_SD }, //0x0000001A - FEXT_FTOSI

View file

@ -341,7 +341,7 @@ static u32 vfp_single_fsqrt(ARMul_State* state, int sd, int unused, s32 m, u32 f
vsp = &vsd;
if (tm & VFP_NAN)
ret = vfp_propagate_nan(vsp, &vsm, NULL, fpscr);
ret = vfp_propagate_nan(vsp, &vsm, nullptr, fpscr);
else if (vsm.sign == 0) {
sqrt_copy:
vsp = &vsm;
@ -725,26 +725,26 @@ static struct op fops_ext[] = {
{ vfp_single_fabs, 0 }, //0x00000001 - FEXT_FABS
{ vfp_single_fneg, 0 }, //0x00000002 - FEXT_FNEG
{ vfp_single_fsqrt, 0 }, //0x00000003 - FEXT_FSQRT
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ vfp_single_fcmp, OP_SCALAR }, //0x00000008 - FEXT_FCMP
{ vfp_single_fcmpe, OP_SCALAR }, //0x00000009 - FEXT_FCMPE
{ vfp_single_fcmpz, OP_SCALAR }, //0x0000000A - FEXT_FCMPZ
{ vfp_single_fcmpez, OP_SCALAR }, //0x0000000B - FEXT_FCMPEZ
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ vfp_single_fcvtd, OP_SCALAR|OP_DD }, //0x0000000F - FEXT_FCVT
{ vfp_single_fuito, OP_SCALAR }, //0x00000010 - FEXT_FUITO
{ vfp_single_fsito, OP_SCALAR }, //0x00000011 - FEXT_FSITO
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ nullptr, 0 },
{ vfp_single_ftoui, OP_SCALAR }, //0x00000018 - FEXT_FTOUI
{ vfp_single_ftouiz, OP_SCALAR }, //0x00000019 - FEXT_FTOUIZ
{ vfp_single_ftosi, OP_SCALAR }, //0x0000001A - FEXT_FTOSI

View file

@ -485,7 +485,7 @@ static void GetHostId(Service::Interface* self) {
addrinfo* res;
hints.ai_family = AF_INET;
getaddrinfo(name, NULL, &hints, &res);
getaddrinfo(name, nullptr, &hints, &res);
sockaddr_in* sock_addr = reinterpret_cast<sockaddr_in*>(res->ai_addr);
in_addr* addr = &sock_addr->sin_addr;