Browse Source

remove memclear

master
Daniel Kolesa 2 years ago
parent
commit
c359c8db9b
  1. 2
      src/engine/animmodel.hh
  2. 4
      src/sauerlib/tools.hh

2
src/engine/animmodel.hh

@ -443,7 +443,7 @@ struct animmodel : model @@ -443,7 +443,7 @@ struct animmodel : model
template<class V, class TC, class T> void calctangents(V *verts, TC *tcverts, int numverts, T *tris, int numtris, bool areaweight)
{
vec *tangent = new vec[2*numverts], *bitangent = tangent+numverts;
memclear(tangent, 2*numverts);
memset(tangent, 0, 2 * numverts * sizeof(vec));
loopi(numtris)
{
const T &t = tris[i];

4
src/sauerlib/tools.hh

@ -224,10 +224,6 @@ inline char *newconcatstring(const char *s, const char *t) @@ -224,10 +224,6 @@ inline char *newconcatstring(const char *s, const char *t)
#define loopvk(v) for(int k = 0; k<(v).length(); k++)
#define loopvrev(v) for(int i = (v).length()-1; i>=0; i--)
template<class T> inline void memclear(T *p, size_t n) { memset((void *)p, 0, n * sizeof(T)); }
template<class T> inline void memclear(T &p) { memset((void *)&p, 0, sizeof(T)); }
template<class T, size_t N> inline void memclear(T (&p)[N]) { memset((void *)p, 0, N * sizeof(T)); }
template <class T>
struct databuf
{

Loading…
Cancel
Save