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;
|
||||
else if (v1 > v2)
|
||||
return SGComparisonCondition::GREATER_THAN;
|
||||
else
|
||||
|
||||
return SGComparisonCondition::EQUALS;
|
||||
break;
|
||||
}
|
||||
case props::INT:
|
||||
return doComp<int>(left->getIntValue(), right->getIntValue(),
|
||||
@ -342,9 +341,8 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode * right, const S
|
||||
return SGComparisonCondition::LESS_THAN;
|
||||
else if (v1 > v2)
|
||||
return SGComparisonCondition::GREATER_THAN;
|
||||
else
|
||||
|
||||
return SGComparisonCondition::EQUALS;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
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 UNSPECIFIED:
|
||||
return simgear::parseString<T>(make_string());
|
||||
break;
|
||||
default: // avoid compiler warning
|
||||
break;
|
||||
}
|
||||
|
@ -300,10 +300,9 @@ read_value(const SGPropertyNode* configNode, SGPropertyNode* modelRoot,
|
||||
if (minClip > SGMiscd::min(SGLimitsd::min(), -SGLimitsd::max()) ||
|
||||
maxClip < SGLimitsd::max())
|
||||
value = new SGClipExpression<double>(value, minClip, maxClip);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1907,37 +1907,26 @@ namespace
|
||||
{
|
||||
case GL_DEPTH_COMPONENT:
|
||||
return chooseReader<GL_DEPTH_COMPONENT>(dataType);
|
||||
break;
|
||||
case GL_LUMINANCE:
|
||||
return chooseReader<GL_LUMINANCE>(dataType);
|
||||
break;
|
||||
case GL_RED:
|
||||
return chooseReader<GL_RED>(dataType);
|
||||
break;
|
||||
case GL_ALPHA:
|
||||
return chooseReader<GL_ALPHA>(dataType);
|
||||
break;
|
||||
case GL_LUMINANCE_ALPHA:
|
||||
return chooseReader<GL_LUMINANCE_ALPHA>(dataType);
|
||||
break;
|
||||
case GL_RGB:
|
||||
return chooseReader<GL_RGB>(dataType);
|
||||
break;
|
||||
case GL_RGBA:
|
||||
return chooseReader<GL_RGBA>(dataType);
|
||||
break;
|
||||
case GL_BGR:
|
||||
return chooseReader<GL_BGR>(dataType);
|
||||
break;
|
||||
case GL_BGRA:
|
||||
return chooseReader<GL_BGRA>(dataType);
|
||||
break;
|
||||
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
|
||||
return &ColorReader<GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GLubyte>::read;
|
||||
break;
|
||||
default:
|
||||
return 0L;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2057,34 +2046,24 @@ namespace
|
||||
{
|
||||
case GL_DEPTH_COMPONENT:
|
||||
return chooseWriter<GL_DEPTH_COMPONENT>(dataType);
|
||||
break;
|
||||
case GL_LUMINANCE:
|
||||
return chooseWriter<GL_LUMINANCE>(dataType);
|
||||
break;
|
||||
case GL_RED:
|
||||
return chooseWriter<GL_RED>(dataType);
|
||||
break;
|
||||
case GL_ALPHA:
|
||||
return chooseWriter<GL_ALPHA>(dataType);
|
||||
break;
|
||||
case GL_LUMINANCE_ALPHA:
|
||||
return chooseWriter<GL_LUMINANCE_ALPHA>(dataType);
|
||||
break;
|
||||
case GL_RGB:
|
||||
return chooseWriter<GL_RGB>(dataType);
|
||||
break;
|
||||
case GL_RGBA:
|
||||
return chooseWriter<GL_RGBA>(dataType);
|
||||
break;
|
||||
case GL_BGR:
|
||||
return chooseWriter<GL_BGR>(dataType);
|
||||
break;
|
||||
case GL_BGRA:
|
||||
return chooseWriter<GL_BGRA>(dataType);
|
||||
break;
|
||||
default:
|
||||
return 0L;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user