- prevent Visual C++ from making stupid code.

This commit is contained in:
Christoph Oelckers 2016-02-25 17:04:34 +01:00
parent eafd2519b4
commit d46e109a5b

View file

@ -56,8 +56,11 @@ struct FDisplacementTable
fixedvec2 getOffset(int x, int y) const fixedvec2 getOffset(int x, int y) const
{ {
static const fixedvec2 nulvec = { 0,0 }; if (x == y)
if (x == y) return nulvec; // shortcut for the most common case {
fixedvec2 nulvec = { 0,0 };
return nulvec; // shortcut for the most common case
}
return data[x + size*y].pos; return data[x + size*y].pos;
} }
}; };