From b91d0d889f1e0d0a0c2f88507a6ffe7517eb1e44 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 10 May 2020 14:38:07 +0300 Subject: [PATCH] Fix warning /home/travis/build/OpenMW/openmw/components/nifosg/nifloader.cpp:615:42: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (hasVisController |= (ctrl->recType == Nif::RC_NiVisController)) ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/travis/build/OpenMW/openmw/components/nifosg/nifloader.cpp:615:42: note: place parentheses around the assignment to silence this warning if (hasVisController |= (ctrl->recType == Nif::RC_NiVisController)) ^ ( ) --- components/nifosg/nifloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 00576943a0..be39f7d55c 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -612,7 +612,7 @@ namespace NifOsg bool hasVisController = false; for (Nif::ControllerPtr ctrl = nifNode->controller; !ctrl.empty(); ctrl = ctrl->next) { - if (hasVisController |= (ctrl->recType == Nif::RC_NiVisController)) + if ((hasVisController |= (ctrl->recType == Nif::RC_NiVisController))) break; }