diff options
author | rodri <rgl@antares-labs.eu> | 2020-06-09 22:43:41 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2020-06-09 22:43:41 +0000 |
commit | e93cc98dc53f3f3480c0ad2b26e0e98735ed791f (patch) | |
tree | 4aa1b35e8161c344113a4e061e8fd64b15d14c68 | |
parent | 6572c456f7cdf6f8aaaf361e618b41816084a7ae (diff) | |
download | boids-e93cc98dc53f3f3480c0ad2b26e0e98735ed791f.tar.gz boids-e93cc98dc53f3f3480c0ad2b26e0e98735ed791f.tar.bz2 boids-e93cc98dc53f3f3480c0ad2b26e0e98735ed791f.zip |
unnecessary realloc tagging.
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -68,13 +68,13 @@ newflock(int nbirds, Rectangle jail) f->birds = realloc(f->birds, ++f->nbirds*sizeof(Bird)); if(f->birds == nil) sysfatal("realloc: %r"); - setrealloctag(f->birds, getcallerpc(&nbirds)); b = &f->birds[f->nbirds-1]; b->p = Pt2(frand()*Dx(jail),frand()*Dy(jail),1); b->v = Vec2(cos(frand()*2*PI),sin(frand()*2*PI)); b->v = mulpt2(b->v, TERMINALV); b->color = pal[Cfg]; } + setrealloctag(f->birds, getcallerpc(&nbirds)); return f; } |