From d46e109a5be91478f659064e0dfe250b0cd9cfba Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 25 Feb 2016 17:04:34 +0100 Subject: [PATCH] - prevent Visual C++ from making stupid code. --- src/portal.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/portal.h b/src/portal.h index 5099d6da5..8665e192c 100644 --- a/src/portal.h +++ b/src/portal.h @@ -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; } };