Remove unreachable code
This commit is contained in:
parent
3898ca5c09
commit
cdd5cf8cd5
@ -312,9 +312,8 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode * right, const S
|
|||||||
return SGComparisonCondition::LESS_THAN;
|
return SGComparisonCondition::LESS_THAN;
|
||||||
else if (v1 > v2)
|
else if (v1 > v2)
|
||||||
return SGComparisonCondition::GREATER_THAN;
|
return SGComparisonCondition::GREATER_THAN;
|
||||||
else
|
|
||||||
return SGComparisonCondition::EQUALS;
|
return SGComparisonCondition::EQUALS;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case props::INT:
|
case props::INT:
|
||||||
return doComp<int>(left->getIntValue(), right->getIntValue(),
|
return doComp<int>(left->getIntValue(), right->getIntValue(),
|
||||||
@ -342,9 +341,8 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode * right, const S
|
|||||||
return SGComparisonCondition::LESS_THAN;
|
return SGComparisonCondition::LESS_THAN;
|
||||||
else if (v1 > v2)
|
else if (v1 > v2)
|
||||||
return SGComparisonCondition::GREATER_THAN;
|
return SGComparisonCondition::GREATER_THAN;
|
||||||
else
|
|
||||||
return SGComparisonCondition::EQUALS;
|
return SGComparisonCondition::EQUALS;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
throw sg_exception("condition: unrecognized node type in comparison");
|
throw sg_exception("condition: unrecognized node type in comparison");
|
||||||
|
@ -2045,7 +2045,6 @@ T SGPropertyNode::getValue(typename std::enable_if<!simgear::props
|
|||||||
case STRING:
|
case STRING:
|
||||||
case UNSPECIFIED:
|
case UNSPECIFIED:
|
||||||
return simgear::parseString<T>(make_string());
|
return simgear::parseString<T>(make_string());
|
||||||
break;
|
|
||||||
default: // avoid compiler warning
|
default: // avoid compiler warning
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -300,10 +300,9 @@ read_value(const SGPropertyNode* configNode, SGPropertyNode* modelRoot,
|
|||||||
if (minClip > SGMiscd::min(SGLimitsd::min(), -SGLimitsd::max()) ||
|
if (minClip > SGMiscd::min(SGLimitsd::min(), -SGLimitsd::max()) ||
|
||||||
maxClip < SGLimitsd::max())
|
maxClip < SGLimitsd::max())
|
||||||
value = new SGClipExpression<double>(value, minClip, maxClip);
|
value = new SGClipExpression<double>(value, minClip, maxClip);
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1907,37 +1907,26 @@ namespace
|
|||||||
{
|
{
|
||||||
case GL_DEPTH_COMPONENT:
|
case GL_DEPTH_COMPONENT:
|
||||||
return chooseReader<GL_DEPTH_COMPONENT>(dataType);
|
return chooseReader<GL_DEPTH_COMPONENT>(dataType);
|
||||||
break;
|
|
||||||
case GL_LUMINANCE:
|
case GL_LUMINANCE:
|
||||||
return chooseReader<GL_LUMINANCE>(dataType);
|
return chooseReader<GL_LUMINANCE>(dataType);
|
||||||
break;
|
|
||||||
case GL_RED:
|
case GL_RED:
|
||||||
return chooseReader<GL_RED>(dataType);
|
return chooseReader<GL_RED>(dataType);
|
||||||
break;
|
|
||||||
case GL_ALPHA:
|
case GL_ALPHA:
|
||||||
return chooseReader<GL_ALPHA>(dataType);
|
return chooseReader<GL_ALPHA>(dataType);
|
||||||
break;
|
|
||||||
case GL_LUMINANCE_ALPHA:
|
case GL_LUMINANCE_ALPHA:
|
||||||
return chooseReader<GL_LUMINANCE_ALPHA>(dataType);
|
return chooseReader<GL_LUMINANCE_ALPHA>(dataType);
|
||||||
break;
|
|
||||||
case GL_RGB:
|
case GL_RGB:
|
||||||
return chooseReader<GL_RGB>(dataType);
|
return chooseReader<GL_RGB>(dataType);
|
||||||
break;
|
|
||||||
case GL_RGBA:
|
case GL_RGBA:
|
||||||
return chooseReader<GL_RGBA>(dataType);
|
return chooseReader<GL_RGBA>(dataType);
|
||||||
break;
|
|
||||||
case GL_BGR:
|
case GL_BGR:
|
||||||
return chooseReader<GL_BGR>(dataType);
|
return chooseReader<GL_BGR>(dataType);
|
||||||
break;
|
|
||||||
case GL_BGRA:
|
case GL_BGRA:
|
||||||
return chooseReader<GL_BGRA>(dataType);
|
return chooseReader<GL_BGRA>(dataType);
|
||||||
break;
|
|
||||||
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
|
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
|
||||||
return &ColorReader<GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GLubyte>::read;
|
return &ColorReader<GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GLubyte>::read;
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return 0L;
|
return 0L;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2057,34 +2046,24 @@ namespace
|
|||||||
{
|
{
|
||||||
case GL_DEPTH_COMPONENT:
|
case GL_DEPTH_COMPONENT:
|
||||||
return chooseWriter<GL_DEPTH_COMPONENT>(dataType);
|
return chooseWriter<GL_DEPTH_COMPONENT>(dataType);
|
||||||
break;
|
|
||||||
case GL_LUMINANCE:
|
case GL_LUMINANCE:
|
||||||
return chooseWriter<GL_LUMINANCE>(dataType);
|
return chooseWriter<GL_LUMINANCE>(dataType);
|
||||||
break;
|
|
||||||
case GL_RED:
|
case GL_RED:
|
||||||
return chooseWriter<GL_RED>(dataType);
|
return chooseWriter<GL_RED>(dataType);
|
||||||
break;
|
|
||||||
case GL_ALPHA:
|
case GL_ALPHA:
|
||||||
return chooseWriter<GL_ALPHA>(dataType);
|
return chooseWriter<GL_ALPHA>(dataType);
|
||||||
break;
|
|
||||||
case GL_LUMINANCE_ALPHA:
|
case GL_LUMINANCE_ALPHA:
|
||||||
return chooseWriter<GL_LUMINANCE_ALPHA>(dataType);
|
return chooseWriter<GL_LUMINANCE_ALPHA>(dataType);
|
||||||
break;
|
|
||||||
case GL_RGB:
|
case GL_RGB:
|
||||||
return chooseWriter<GL_RGB>(dataType);
|
return chooseWriter<GL_RGB>(dataType);
|
||||||
break;
|
|
||||||
case GL_RGBA:
|
case GL_RGBA:
|
||||||
return chooseWriter<GL_RGBA>(dataType);
|
return chooseWriter<GL_RGBA>(dataType);
|
||||||
break;
|
|
||||||
case GL_BGR:
|
case GL_BGR:
|
||||||
return chooseWriter<GL_BGR>(dataType);
|
return chooseWriter<GL_BGR>(dataType);
|
||||||
break;
|
|
||||||
case GL_BGRA:
|
case GL_BGRA:
|
||||||
return chooseWriter<GL_BGRA>(dataType);
|
return chooseWriter<GL_BGRA>(dataType);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return 0L;
|
return 0L;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user