-
-
Notifications
You must be signed in to change notification settings - Fork 957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler warning fixes for Visual Studio 2010 #571
Conversation
#ifndef OGRE_HAS_CXX11_EXPLICIT_CONVERSION_OPERATORS | ||
# pragma warning ( push ) | ||
# pragma warning ( disable: 4800 ) | ||
#endif | ||
return (bool)mDataStream; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think mDataStream != 0
would be a better fix instead of using the pragmas and associated compiler checks for fixing C4800.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I'll try this.
@@ -66,7 +66,11 @@ namespace Ogre | |||
|
|||
bool TerrainLodManager::isOpen() const | |||
{ | |||
#ifndef OGRE_HAS_CXX11_EXPLICIT_CONVERSION_OPERATORS | |||
return mDataStream != 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, this should have been mDataStream.get() != 0;
as SharedPtr lacks a != operator for ptr. Also you can drop the ifdefs as this method will also work with OGRE_HAS_CXX11_EXPLICIT_CONVERSION_OPERATORS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll change it. I wonder why it compiled without warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I drop the new OGRE_HAS_CXX11_EXPLICIT_CONVERSION_OPERATORS
define as well since it's no longer needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
@@ -361,6 +361,10 @@ namespace Ogre { | |||
*/ | |||
virtual ResourcePtr getByHandle(ResourceHandle handle); | |||
|
|||
#ifndef OGRE_HAS_CXX11_EXPLICIT_CONVERSION_OPERATORS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you missed this part
…e and compare against the pointer properly.
No description provided.