Hi Robert, Yeah,you are right! cheers zhuwan 01,09,2014
在2014-1-9 4:11:25,"Robert Osfield" <[email protected]> 写道: -----原始邮件----- 发件人: "Robert Osfield" <[email protected]> 发送时间: 2014-1-9 4:11:25 收件人: "OpenSceneGraph Users" <[email protected]> 主题: Re: [osg-users] Compiling in MSVC with OSG_DISABLE_MSVC_WARNINGS defined causes warnings in user code to remain disabled Hi Judson, The push/pop approach has to be protected by platform specifics and has to be splurged all over the code, and it can't be tested by everyone so it will invariable lead to build breakages as things don't get added/or removed. I firmly believe it's a *TERRIBLE* solution so will not be allowing it anywhere near the OSG code base. If you want to make code portable, readable and maintainable for have to avoid such platform specific hacks. Now fixing warnings themselves is the ideal, but, and it's a big but, the code changes to quieten warnings have to actively improve the code rather than just work around a warning for the sake of it. Fixing warnings willy nilly can introduce bugs, I know I've seen several come and go over the years, both mistakes I've made myself and ones I've spotted in contributions. Robert. On 8 January 2014 18:12, Judson Weissert <[email protected]> wrote: Hi Robert, Thank you for your reply, I appreciate the amount of time you dedicate to the mailing list, and the OSG project in general. On 1/8/2014 12:19 PM, Robert Osfield wrote: Hi Judson, Over the years we've found VS products lots of unhelpful warnings are perfectly correct code so we've had to resort to disabling them. That is fair, I guess I am suggesting that the method in which they are disabled be reconsidered. The boost C++ libraries have some documentation on this topic as well. See https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines Adding lots special VS only pragmas to OSG code would be VERY painful to maintain so we don't do it. If you want to do it in your own code then fine, but we won't be doing it with the OSG, it's portable library that tries it best to be clean from platform specific workarounds. I agree, the problem is that the platform specific workaround that is in there now has side effects that can be perceived as harmful. If you don't want the warnings disabled then just select the Cmake option that doesn't defined OSG_DISABLE_MSVC_WARNINGS. Easy. This is why the Cmake option exists. Indeed. Robert. Thank you, Judson _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

