From 74c527d72b3b670cb347c0c60092ec6d38053392 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 23 May 2002 01:34:39 +0000 Subject: [PATCH] work around VC7 bug --- panda/src/gobj/lens.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/panda/src/gobj/lens.cxx b/panda/src/gobj/lens.cxx index 0b65852a7d..c31b1c8540 100644 --- a/panda/src/gobj/lens.cxx +++ b/panda/src/gobj/lens.cxx @@ -1313,8 +1313,12 @@ compute_film_mat() { // The lens will return a point in the range [-film_size/2, // film_size/2] in each dimension. Convert this to [-1, 1], and // also apply the offset. - const LVecBase2f &film_size = get_film_size(); - const LVector2f &film_offset = get_film_offset(); + + // We declare these two as local variables, instead of references, + // to work around a VC7 compiler bug. + LVecBase2f film_size = get_film_size(); + LVector2f film_offset = get_film_offset(); + /* this line triggers a VC7 opt bug, so explicitly set matrix below instead _film_mat = LMatrix4f::translate_mat(-film_offset[0], -film_offset[1], 0.0f) *