diff --git a/apps/opencs/model/filter/parser.cpp b/apps/opencs/model/filter/parser.cpp index d2a4f2a356..d363b4849d 100644 --- a/apps/opencs/model/filter/parser.cpp +++ b/apps/opencs/model/filter/parser.cpp @@ -325,12 +325,6 @@ std::shared_ptr CSMFilter::Parser::parseNAry (const Token& keyw break; } - if (nodes.empty()) - { - error(); - return std::shared_ptr(); - } - switch (keyword.mType) { case Token::Type_Keyword_And: return std::shared_ptr (new AndNode (nodes)); diff --git a/apps/opencs/view/render/terraintexturemode.cpp b/apps/opencs/view/render/terraintexturemode.cpp index c8d63f32e8..09d6b135a1 100644 --- a/apps/opencs/view/render/terraintexturemode.cpp +++ b/apps/opencs/view/render/terraintexturemode.cpp @@ -429,12 +429,8 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe { int distanceX(0); int distanceY(0); - if (i_cell < cellX) distanceX = xHitInCell + landTextureSize * abs(i_cell-cellX) - i; - if (j_cell < cellY) distanceY = yHitInCell + landTextureSize * abs(j_cell-cellY) - j; - if (i_cell > cellX) distanceX = -xHitInCell + landTextureSize* abs(i_cell-cellX) + i; - if (j_cell > cellY) distanceY = -yHitInCell + landTextureSize * abs(j_cell-cellY) + j; - if (i_cell == cellX) distanceX = abs(i-xHitInCell); - if (j_cell == cellY) distanceY = abs(j-yHitInCell); + distanceX = abs(i-xHitInCell); + distanceY = abs(j-yHitInCell); float distance = std::round(sqrt(pow(distanceX, 2)+pow(distanceY, 2))); float rf = static_cast(mBrushSize) / 2; if (distance < rf) newTerrain[j*landTextureSize+i] = brushInt; diff --git a/apps/openmw/mwgui/journalwindow.cpp b/apps/openmw/mwgui/journalwindow.cpp index 1474becf08..96c42549a5 100644 --- a/apps/openmw/mwgui/journalwindow.cpp +++ b/apps/openmw/mwgui/journalwindow.cpp @@ -561,7 +561,7 @@ namespace if (mAllQuests) { SetNamesInactive setInactive(list); - mModel->visitQuestNames(!mAllQuests, setInactive); + mModel->visitQuestNames(false, setInactive); } MWBase::Environment::get().getWindowManager()->playSound("book page"); diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index b9bfe6bc0f..b9ef50bf7f 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -446,9 +446,9 @@ std::string CharacterController::fallbackShortWeaponGroup(const std::string& bas const ESM::WeaponType* weapInfo = getWeaponType(mWeaponType); // For real two-handed melee weapons use 2h swords animations as fallback, otherwise use the 1h ones - if (isRealWeapon && weapInfo->mFlags & ESM::WeaponType::TwoHanded && weapInfo->mWeaponClass == ESM::WeaponType::Melee) + if (weapInfo->mFlags & ESM::WeaponType::TwoHanded && weapInfo->mWeaponClass == ESM::WeaponType::Melee) groupName += twoHandFallback; - else if (isRealWeapon) + else groupName += oneHandFallback; // Special case for crossbows - we shouls apply 1h animations a fallback only for lower body diff --git a/components/compiler/scanner.hpp b/components/compiler/scanner.hpp index 2139f04b26..9c7bd656ed 100644 --- a/components/compiler/scanner.hpp +++ b/components/compiler/scanner.hpp @@ -140,15 +140,12 @@ namespace Compiler for (int i = 0; i <= length; i++) { - if (length >= i) - { - in.get (ch); + in.get (ch); - if (!in.good()) - return false; + if (!in.good()) + return false; - mData[i] = ch; - } + mData[i] = ch; } mLength = length; diff --git a/extern/oics/ICSInputControlSystem_joystick.cpp b/extern/oics/ICSInputControlSystem_joystick.cpp index 38199436ba..697d0ed3d3 100644 --- a/extern/oics/ICSInputControlSystem_joystick.cpp +++ b/extern/oics/ICSInputControlSystem_joystick.cpp @@ -286,7 +286,7 @@ namespace ICS //ControlAxisBinderItem joystickBinderItem = mControlsJoystickAxisBinderMap[ evt.which ][ axis ]; // joystic axis start at 0 index //Control* ctrl = joystickBinderItem.control; //if(ctrl && ctrl->isAxisBindable()) - if(mDetectingBindingControl && mDetectingBindingControl->isAxisBindable()) + if(mDetectingBindingControl->isAxisBindable()) { if( abs( evt.value ) > ICS_JOYSTICK_AXIS_BINDING_MARGIN) {