1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0026988: Fresh compiler warnings (VC++ 14, GCC 5.2.1, CLang 3.6.2)

Compiler warnings eliminated:

- VC++: potential use of uninitialized variable
- GCC: potential use of uninitialized variable [-Wmaybe-uninitialized], redundant const on return value [-Wignored-qualifiers]
- CLang: missing override specifier on overloaded virtual function [-Winconsistent-missing-override], function call within typeid() [-Wpotentially-evaluated-expression]
This commit is contained in:
abv
2015-12-13 13:21:54 +03:00
committed by bugmaster
parent 795be040eb
commit c785481848
20 changed files with 83 additions and 89 deletions

View File

@@ -857,21 +857,21 @@ Standard_Boolean IntTools_Context::IsVertexOnLine
else
{
// Local search may fail. Try to use more precise algo.
Extrema_ExtPC anExt(aPv, aGAC, 1.e-10);
Extrema_ExtPC anExt2(aPv, aGAC, 1.e-10);
Standard_Real aMinDist = RealLast();
Standard_Integer aMinIdx = -1;
for (Standard_Integer anIdx = 1; anIdx <= anExt.NbExt(); anIdx++)
for (Standard_Integer anIdx = 1; anIdx <= anExt2.NbExt(); anIdx++)
{
if ( anExt.IsMin(anIdx) &&
anExt.SquareDistance(anIdx) < aMinDist )
if ( anExt2.IsMin(anIdx) &&
anExt2.SquareDistance(anIdx) < aMinDist )
{
aMinDist = anExt.SquareDistance(anIdx);
aMinDist = anExt2.SquareDistance(anIdx);
aMinIdx = anIdx;
}
}
if (aMinIdx != -1)
{
const Extrema_POnCurv& aPOncurve = anExt.Point(aMinIdx);
const Extrema_POnCurv& aPOncurve = anExt2.Point(aMinIdx);
aT = aPOncurve.Parameter();
if((aT > (aLast + aFirst) * 0.5) ||
@@ -909,21 +909,21 @@ Standard_Boolean IntTools_Context::IsVertexOnLine
else
{
// Local search may fail. Try to use more precise algo.
Extrema_ExtPC anExt(aPv, aGAC, 1.e-10);
Extrema_ExtPC anExt2(aPv, aGAC, 1.e-10);
Standard_Real aMinDist = RealLast();
Standard_Integer aMinIdx = -1;
for (Standard_Integer anIdx = 1; anIdx <= anExt.NbExt(); anIdx++)
for (Standard_Integer anIdx = 1; anIdx <= anExt2.NbExt(); anIdx++)
{
if ( anExt.IsMin(anIdx) &&
anExt.SquareDistance(anIdx) < aMinDist )
if ( anExt2.IsMin(anIdx) &&
anExt2.SquareDistance(anIdx) < aMinDist )
{
aMinDist = anExt.SquareDistance(anIdx);
aMinDist = anExt2.SquareDistance(anIdx);
aMinIdx = anIdx;
}
}
if (aMinIdx != -1)
{
const Extrema_POnCurv& aPOncurve = anExt.Point(aMinIdx);
const Extrema_POnCurv& aPOncurve = anExt2.Point(aMinIdx);
aT = aPOncurve.Parameter();
if((aT < (aLast + aFirst) * 0.5) ||