Replaced all NULL with nullptr

This commit is contained in:
Mafciejewicz
2021-08-29 20:38:03 +02:00
parent 99b7e86ded
commit 8962fc147d
6 changed files with 14 additions and 14 deletions

View File

@@ -167,9 +167,9 @@ class Image : public ::Image {
* Unload image from CPU memory (RAM)
*/
inline void Unload() {
if (data != NULL) {
if (data != nullptr) {
::UnloadImage(*this);
data = NULL;
data = nullptr;
}
}

View File

@@ -51,9 +51,9 @@ class Material : public ::Material {
* Unload material from memory
*/
inline void Unload() {
if (maps != NULL) {
if (maps != nullptr) {
::UnloadMaterial(*this);
maps = NULL;
maps = nullptr;
}
}

View File

@@ -159,9 +159,9 @@ class Mesh : public ::Mesh {
* Unload mesh from memory (RAM and/or VRAM)
*/
inline void Unload() {
if (vboId != NULL) {
if (vboId != nullptr) {
::UnloadMesh(*this);
vboId = NULL;
vboId = nullptr;
}
}

View File

@@ -48,10 +48,10 @@ class Model : public ::Model {
* Unload model (including meshes) from memory (RAM and/or VRAM)
*/
inline void Unload() {
if (meshes != NULL || materials != NULL) {
if (meshes != nullptr || materials != nullptr) {
::UnloadModel(*this);
meshes = NULL;
materials = NULL;
meshes = nullptr;
materials = nullptr;
}
}

View File

@@ -17,7 +17,7 @@ class Shader : public ::Shader {
set(shader);
}
Shader(unsigned int id, int* locs = NULL) : ::Shader{id, locs} {}
Shader(unsigned int id, int* locs = nullptr) : ::Shader{id, locs} {}
Shader(const std::string& vsFileName, const std::string& fsFileName) {
set(::LoadShader(vsFileName.c_str(), fsFileName.c_str()));
@@ -47,7 +47,7 @@ class Shader : public ::Shader {
}
void Unload() {
if (locs != NULL) {
if (locs != nullptr) {
::UnloadShader(*this);
}
}

View File

@@ -21,7 +21,7 @@ class Wave : public ::Wave {
unsigned int sampleRate = 0,
unsigned int sampleSize = 0,
unsigned int channels = 0,
void *data = NULL
void *data = nullptr
) : ::Wave{sampleCount, sampleRate, sampleSize, channels, data} { }
/**
@@ -113,9 +113,9 @@ class Wave : public ::Wave {
* Unload wave data
*/
void Unload() {
if (data != NULL) {
if (data != nullptr) {
::UnloadWave(*this);
data = NULL;
data = nullptr;
}
}