mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-12-03 01:18:26 +00:00
Replaced all NULL with nullptr
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user