Merge pull request #5042 from Jackie9527/msvc-clang-unreachable-code
Fix warning related to unreachable-code.pull/5056/head^2
commit
8705940801
|
@ -418,7 +418,6 @@ void B3DImporter::ReadTRIS(int v0) {
|
||||||
ASSIMP_LOG_ERROR("Bad triangle index: i0=", i0, ", i1=", i1, ", i2=", i2);
|
ASSIMP_LOG_ERROR("Bad triangle index: i0=", i0, ", i1=", i1, ", i2=", i2);
|
||||||
#endif
|
#endif
|
||||||
Fail("Bad triangle index");
|
Fail("Bad triangle index");
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
face->mNumIndices = 3;
|
face->mNumIndices = 3;
|
||||||
face->mIndices = new unsigned[3];
|
face->mIndices = new unsigned[3];
|
||||||
|
|
|
@ -345,7 +345,7 @@ void LWOImporter::ConvertMaterial(const LWO::Surface &surf, aiMaterial *pcMat) {
|
||||||
|
|
||||||
// (the diffuse value is just a scaling factor)
|
// (the diffuse value is just a scaling factor)
|
||||||
// If a diffuse texture is set, we set this value to 1.0
|
// If a diffuse texture is set, we set this value to 1.0
|
||||||
clr = (b && false ? aiColor3D(1.0, 1.0, 1.0) : surf.mColor);
|
clr = (b ? aiColor3D(1.0, 1.0, 1.0) : surf.mColor);
|
||||||
clr.r *= surf.mDiffuseValue;
|
clr.r *= surf.mDiffuseValue;
|
||||||
clr.g *= surf.mDiffuseValue;
|
clr.g *= surf.mDiffuseValue;
|
||||||
clr.b *= surf.mDiffuseValue;
|
clr.b *= surf.mDiffuseValue;
|
||||||
|
|
|
@ -1248,7 +1248,6 @@ IF (ASSIMP_WARNINGS_AS_ERRORS)
|
||||||
-Wno-comma
|
-Wno-comma
|
||||||
-Wno-unreachable-code-break
|
-Wno-unreachable-code-break
|
||||||
-Wno-unreachable-code-return
|
-Wno-unreachable-code-return
|
||||||
-Wno-unreachable-code
|
|
||||||
-Wno-implicit-fallthrough
|
-Wno-implicit-fallthrough
|
||||||
-Wno-unused-template
|
-Wno-unused-template
|
||||||
-Wno-undefined-func-template
|
-Wno-undefined-func-template
|
||||||
|
|
|
@ -118,8 +118,8 @@ void Sweep::EdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* triangl
|
||||||
Point* p1 = triangle->PointCCW(point);
|
Point* p1 = triangle->PointCCW(point);
|
||||||
Orientation o1 = Orient2d(eq, *p1, ep);
|
Orientation o1 = Orient2d(eq, *p1, ep);
|
||||||
if (o1 == COLLINEAR) {
|
if (o1 == COLLINEAR) {
|
||||||
// ASSIMP_CHANGE (aramis_acg)
|
|
||||||
throw std::runtime_error("EdgeEvent - collinear points not supported");
|
|
||||||
if( triangle->Contains(&eq, p1)) {
|
if( triangle->Contains(&eq, p1)) {
|
||||||
triangle->MarkConstrainedEdge(&eq, p1 );
|
triangle->MarkConstrainedEdge(&eq, p1 );
|
||||||
// We are modifying the constraint maybe it would be better to
|
// We are modifying the constraint maybe it would be better to
|
||||||
|
@ -137,8 +137,8 @@ void Sweep::EdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* triangl
|
||||||
Point* p2 = triangle->PointCW(point);
|
Point* p2 = triangle->PointCW(point);
|
||||||
Orientation o2 = Orient2d(eq, *p2, ep);
|
Orientation o2 = Orient2d(eq, *p2, ep);
|
||||||
if (o2 == COLLINEAR) {
|
if (o2 == COLLINEAR) {
|
||||||
// ASSIMP_CHANGE (aramis_acg)
|
|
||||||
throw std::runtime_error("EdgeEvent - collinear points not supported");
|
|
||||||
|
|
||||||
if( triangle->Contains(&eq, p2)) {
|
if( triangle->Contains(&eq, p2)) {
|
||||||
triangle->MarkConstrainedEdge(&eq, p2 );
|
triangle->MarkConstrainedEdge(&eq, p2 );
|
||||||
|
|
Loading…
Reference in New Issue