Remove unnecessary null pointer checks

This commit is contained in:
Emmanuel Leblond 2016-01-04 11:46:16 +01:00
parent cb39db0b02
commit cabf923484
8 changed files with 10 additions and 19 deletions

View file

@ -217,8 +217,8 @@ b2Polygon::b2Polygon(b2Triangle& t) {
void b2Polygon::Set(const b2Polygon& p) {
if (nVertices != p.nVertices){
nVertices = p.nVertices;
if (x) delete[] x;
if (y) delete[] y;
delete[] x;
delete[] y;
x = new float32[nVertices];
y = new float32[nVertices];
}