Skip to content

Commit 8962fc1

Browse files
committed
Replaced all NULL with nullptr
1 parent 99b7e86 commit 8962fc1

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

include/Image.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ class Image : public ::Image {
167167
* Unload image from CPU memory (RAM)
168168
*/
169169
inline void Unload() {
170-
if (data != NULL) {
170+
if (data != nullptr) {
171171
::UnloadImage(*this);
172-
data = NULL;
172+
data = nullptr;
173173
}
174174
}
175175

include/Material.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ class Material : public ::Material {
5151
* Unload material from memory
5252
*/
5353
inline void Unload() {
54-
if (maps != NULL) {
54+
if (maps != nullptr) {
5555
::UnloadMaterial(*this);
56-
maps = NULL;
56+
maps = nullptr;
5757
}
5858
}
5959

include/Mesh.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ class Mesh : public ::Mesh {
159159
* Unload mesh from memory (RAM and/or VRAM)
160160
*/
161161
inline void Unload() {
162-
if (vboId != NULL) {
162+
if (vboId != nullptr) {
163163
::UnloadMesh(*this);
164-
vboId = NULL;
164+
vboId = nullptr;
165165
}
166166
}
167167

include/Model.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ class Model : public ::Model {
4848
* Unload model (including meshes) from memory (RAM and/or VRAM)
4949
*/
5050
inline void Unload() {
51-
if (meshes != NULL || materials != NULL) {
51+
if (meshes != nullptr || materials != nullptr) {
5252
::UnloadModel(*this);
53-
meshes = NULL;
54-
materials = NULL;
53+
meshes = nullptr;
54+
materials = nullptr;
5555
}
5656
}
5757

include/Shader.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Shader : public ::Shader {
1717
set(shader);
1818
}
1919

20-
Shader(unsigned int id, int* locs = NULL) : ::Shader{id, locs} {}
20+
Shader(unsigned int id, int* locs = nullptr) : ::Shader{id, locs} {}
2121

2222
Shader(const std::string& vsFileName, const std::string& fsFileName) {
2323
set(::LoadShader(vsFileName.c_str(), fsFileName.c_str()));
@@ -47,7 +47,7 @@ class Shader : public ::Shader {
4747
}
4848

4949
void Unload() {
50-
if (locs != NULL) {
50+
if (locs != nullptr) {
5151
::UnloadShader(*this);
5252
}
5353
}

include/Wave.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Wave : public ::Wave {
2121
unsigned int sampleRate = 0,
2222
unsigned int sampleSize = 0,
2323
unsigned int channels = 0,
24-
void *data = NULL
24+
void *data = nullptr
2525
) : ::Wave{sampleCount, sampleRate, sampleSize, channels, data} { }
2626

2727
/**
@@ -113,9 +113,9 @@ class Wave : public ::Wave {
113113
* Unload wave data
114114
*/
115115
void Unload() {
116-
if (data != NULL) {
116+
if (data != nullptr) {
117117
::UnloadWave(*this);
118-
data = NULL;
118+
data = nullptr;
119119
}
120120
}
121121

0 commit comments

Comments
 (0)