From 8962fc147d6c7f668f1de8701115c30f148fef0f Mon Sep 17 00:00:00 2001 From: Mafciejewicz Date: Sun, 29 Aug 2021 20:38:03 +0200 Subject: [PATCH] Replaced all NULL with nullptr --- include/Image.hpp | 4 ++-- include/Material.hpp | 4 ++-- include/Mesh.hpp | 4 ++-- include/Model.hpp | 6 +++--- include/Shader.hpp | 4 ++-- include/Wave.hpp | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/Image.hpp b/include/Image.hpp index 10314a3..53eaf59 100644 --- a/include/Image.hpp +++ b/include/Image.hpp @@ -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; } } diff --git a/include/Material.hpp b/include/Material.hpp index 8b8bcbd..f46ed92 100644 --- a/include/Material.hpp +++ b/include/Material.hpp @@ -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; } } diff --git a/include/Mesh.hpp b/include/Mesh.hpp index eab5fc8..1069e10 100644 --- a/include/Mesh.hpp +++ b/include/Mesh.hpp @@ -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; } } diff --git a/include/Model.hpp b/include/Model.hpp index c201b7f..f4b5e60 100644 --- a/include/Model.hpp +++ b/include/Model.hpp @@ -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; } } diff --git a/include/Shader.hpp b/include/Shader.hpp index dd82b39..594b300 100644 --- a/include/Shader.hpp +++ b/include/Shader.hpp @@ -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); } } diff --git a/include/Wave.hpp b/include/Wave.hpp index 871143c..9e0a843 100644 --- a/include/Wave.hpp +++ b/include/Wave.hpp @@ -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; } }