aboutsummaryrefslogtreecommitdiff
path: root/src/util/pointer.h
diff options
context:
space:
mode:
authorLexi Hale <5723574+velartrill@users.noreply.github.com>2022-07-13 11:57:12 +0200
committerGitHub <noreply@github.com>2022-07-13 11:57:12 +0200
commit20bd6bdb685af11548c35d3a48e5aa33f4222397 (patch)
tree6f60bad900cdb0ea28606bfe3f860b4948eeb277 /src/util/pointer.h
parent8724fe6e3fc2b6c0b78123f1f95fd8c6c6817dd5 (diff)
downloadminetest-20bd6bdb685af11548c35d3a48e5aa33f4222397.tar.gz
minetest-20bd6bdb685af11548c35d3a48e5aa33f4222397.tar.bz2
minetest-20bd6bdb685af11548c35d3a48e5aa33f4222397.zip
Animated particlespawners and more (#11545)
Co-authored-by: Lars Mueller <appgurulars@gmx.de> Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: Dmitry Kostenko <codeforsmile@gmail.com>
Diffstat (limited to 'src/util/pointer.h')
-rw-r--r--src/util/pointer.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/util/pointer.h b/src/util/pointer.h
index 245ac85bf..b659cea0e 100644
--- a/src/util/pointer.h
+++ b/src/util/pointer.h
@@ -45,7 +45,7 @@ public:
Buffer()
{
m_size = 0;
- data = NULL;
+ data = nullptr;
}
Buffer(unsigned int size)
{
@@ -53,7 +53,7 @@ public:
if(size != 0)
data = new T[size];
else
- data = NULL;
+ data = nullptr;
}
// Disable class copy
@@ -82,7 +82,7 @@ public:
memcpy(data, t, size);
}
else
- data = NULL;
+ data = nullptr;
}
~Buffer()
@@ -166,7 +166,7 @@ public:
if(m_size != 0)
data = new T[m_size];
else
- data = NULL;
+ data = nullptr;
refcount = new unsigned int;
memset(data,0,sizeof(T)*m_size);
(*refcount) = 1;
@@ -201,7 +201,7 @@ public:
memcpy(data, t, m_size);
}
else
- data = NULL;
+ data = nullptr;
refcount = new unsigned int;
(*refcount) = 1;
}
@@ -216,7 +216,7 @@ public:
memcpy(data, *buffer, buffer.getSize());
}
else
- data = NULL;
+ data = nullptr;
refcount = new unsigned int;
(*refcount) = 1;
}
@@ -256,3 +256,4 @@ private:
unsigned int m_size;
unsigned int *refcount;
};
+