Fix MSVC 4706 warnings

pull/3069/head
Andrei Kortunov 4 years ago
parent f2f2c3d873
commit 6d351b2bdd

@ -1315,7 +1315,8 @@ public:
while (callback)
{
if ((composite = dynamic_cast<SceneUtil::CompositeStateSetUpdater*>(callback)))
composite = dynamic_cast<SceneUtil::CompositeStateSetUpdater*>(callback);
if (composite)
break;
callback = callback->getNestedCallback();

@ -35,7 +35,16 @@
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/copy.hpp>
#if defined(_MSC_VER)
#pragma warning (push)
#pragma warning (disable : 4706)
#include <boost/iostreams/filter/zlib.hpp>
#pragma warning (pop)
#else
#include <boost/iostreams/filter/zlib.hpp>
#endif
#include <boost/iostreams/device/array.hpp>
#include <components/bsa/memorystream.hpp>

@ -176,7 +176,8 @@ namespace Interpreter{
transform(temp.begin(), temp.end(), temp.begin(), ::tolower);
}
if((found = check(temp, globals[j], &i, &start))){
found = check(temp, globals[j], &i, &start);
if(found){
char type = context.getGlobalType(globals[j]);
switch(type){

@ -126,8 +126,7 @@ osg::ref_ptr<Resource::BulletShape> BulletNifLoader::load(const Nif::File& nif)
{
Nif::Record* r = nif.getRoot(i);
assert(r != nullptr);
Nif::Node* node = nullptr;
if ((node = dynamic_cast<Nif::Node*>(r)))
if (Nif::Node* node = dynamic_cast<Nif::Node*>(r))
roots.emplace_back(node);
}
const std::string filename = nif.getFilename();

@ -312,8 +312,7 @@ namespace NifOsg
for (size_t i = 0; i < numRoots; ++i)
{
const Nif::Record* r = nif->getRoot(i);
const Nif::Node* nifNode = nullptr;
if ((nifNode = dynamic_cast<const Nif::Node*>(r)))
if (const Nif::Node* nifNode = dynamic_cast<const Nif::Node*>(r))
roots.emplace_back(nifNode);
}
if (roots.empty())
@ -609,7 +608,8 @@ namespace NifOsg
bool hasVisController = false;
for (Nif::ControllerPtr ctrl = nifNode->controller; !ctrl.empty(); ctrl = ctrl->next)
{
if ((hasVisController |= (ctrl->recType == Nif::RC_NiVisController)))
hasVisController |= (ctrl->recType == Nif::RC_NiVisController);
if (hasVisController)
break;
}

@ -194,8 +194,9 @@ void ShadowsBin::sortImplementation()
// noTestRoot is now a stategraph with useDiffuseMapForShadowAlpha disabled but minimal other state
bool cullFaceOverridden = false;
while ((root = root->_parent))
while (root->_parent)
{
root = root->_parent;
if (!root->getStateSet())
continue;
unsigned int cullFaceFlags = root->getStateSet()->getMode(GL_CULL_FACE);

Loading…
Cancel
Save