historic_bruno Posted November 10, 2012 Report Share Posted November 10, 2012 I can't access Trac at the moment, so I'll post this here. I get the following two warnings when compiling in VS2010:13>c:\users\ben\devel\ps\source\renderer\renderer.cpp(1486): warning C4701: potentially uninitialized local variable 'reflectionScissor' used13>c:\users\ben\devel\ps\source\renderer\renderer.cpp(1493): warning C4701: potentially uninitialized local variable 'refractionScissor' usedNot sure if it causes a problem in practice, but there's no default constructor for SScreenRect, so it needs to be initialized somehow.Also if I'm understanding the code correctly, it seems like the logic between lines 1484-1504 could be reduced to two cases, since refractionScissor is only used if (m_Options.m_WaterRefraction && !m_Options.m_WaterReflection). Quote Link to comment Share on other sites More sharing options...
wraitii Posted November 10, 2012 Report Share Posted November 10, 2012 That's my recent changes. I'll change it, I had done that to avoid problems (I encountered a bug when doing differently, but it ended up being unrelated to this code).Edit: okay, changed the logic, the warning should not appear anymore. And no, there are 3 cases: both reflection and refraction, reflection only, refraction only. The "both" case I had made a mistake on and so it appeared similar to one of the others. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.