Avoid dead code

pull/593/head
Andrei Kortunov 4 years ago
parent 801e2d6ad0
commit 7fc4c9f3f6

@ -325,12 +325,6 @@ std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& keyw
break; break;
} }
if (nodes.empty())
{
error();
return std::shared_ptr<Node>();
}
switch (keyword.mType) switch (keyword.mType)
{ {
case Token::Type_Keyword_And: return std::shared_ptr<CSMFilter::Node> (new AndNode (nodes)); case Token::Type_Keyword_And: return std::shared_ptr<CSMFilter::Node> (new AndNode (nodes));

@ -429,12 +429,8 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
{ {
int distanceX(0); int distanceX(0);
int distanceY(0); int distanceY(0);
if (i_cell < cellX) distanceX = xHitInCell + landTextureSize * abs(i_cell-cellX) - i; distanceX = abs(i-xHitInCell);
if (j_cell < cellY) distanceY = yHitInCell + landTextureSize * abs(j_cell-cellY) - j; distanceY = abs(j-yHitInCell);
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);
float distance = std::round(sqrt(pow(distanceX, 2)+pow(distanceY, 2))); float distance = std::round(sqrt(pow(distanceX, 2)+pow(distanceY, 2)));
float rf = static_cast<float>(mBrushSize) / 2; float rf = static_cast<float>(mBrushSize) / 2;
if (distance < rf) newTerrain[j*landTextureSize+i] = brushInt; if (distance < rf) newTerrain[j*landTextureSize+i] = brushInt;

@ -561,7 +561,7 @@ namespace
if (mAllQuests) if (mAllQuests)
{ {
SetNamesInactive setInactive(list); SetNamesInactive setInactive(list);
mModel->visitQuestNames(!mAllQuests, setInactive); mModel->visitQuestNames(false, setInactive);
} }
MWBase::Environment::get().getWindowManager()->playSound("book page"); MWBase::Environment::get().getWindowManager()->playSound("book page");

@ -446,9 +446,9 @@ std::string CharacterController::fallbackShortWeaponGroup(const std::string& bas
const ESM::WeaponType* weapInfo = getWeaponType(mWeaponType); const ESM::WeaponType* weapInfo = getWeaponType(mWeaponType);
// For real two-handed melee weapons use 2h swords animations as fallback, otherwise use the 1h ones // 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; groupName += twoHandFallback;
else if (isRealWeapon) else
groupName += oneHandFallback; groupName += oneHandFallback;
// Special case for crossbows - we shouls apply 1h animations a fallback only for lower body // Special case for crossbows - we shouls apply 1h animations a fallback only for lower body

@ -140,15 +140,12 @@ namespace Compiler
for (int i = 0; i <= length; i++) for (int i = 0; i <= length; i++)
{ {
if (length >= i) in.get (ch);
{
in.get (ch);
if (!in.good()) if (!in.good())
return false; return false;
mData[i] = ch; mData[i] = ch;
}
} }
mLength = length; mLength = length;

@ -286,7 +286,7 @@ namespace ICS
//ControlAxisBinderItem joystickBinderItem = mControlsJoystickAxisBinderMap[ evt.which ][ axis ]; // joystic axis start at 0 index //ControlAxisBinderItem joystickBinderItem = mControlsJoystickAxisBinderMap[ evt.which ][ axis ]; // joystic axis start at 0 index
//Control* ctrl = joystickBinderItem.control; //Control* ctrl = joystickBinderItem.control;
//if(ctrl && ctrl->isAxisBindable()) //if(ctrl && ctrl->isAxisBindable())
if(mDetectingBindingControl && mDetectingBindingControl->isAxisBindable()) if(mDetectingBindingControl->isAxisBindable())
{ {
if( abs( evt.value ) > ICS_JOYSTICK_AXIS_BINDING_MARGIN) if( abs( evt.value ) > ICS_JOYSTICK_AXIS_BINDING_MARGIN)
{ {

Loading…
Cancel
Save