mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
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>
This commit is contained in:
parent
8724fe6e3f
commit
20bd6bdb68
17 changed files with 1986 additions and 279 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue