- 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
1 changed files with 5 additions and 2 deletions

View File

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