Browse Source

remove memclear

master
Daniel Kolesa 3 months ago
parent
commit
c359c8db9b
2 changed files with 1 additions and 5 deletions
  1. +1
    -1
      src/engine/animmodel.hh
  2. +0
    -4
      src/sauerlib/tools.hh

+ 1
- 1
src/engine/animmodel.hh View File

@@ -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];


+ 0
- 4
src/sauerlib/tools.hh View File

@@ -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