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

0026586: Eliminate compile warnings obtained by building occt with vc14: declaration of local variable hides previous local declaration

Eliminated warnings about "declaration of some local variable hides previous local declaration"
This commit is contained in:
ski
2015-09-08 15:41:26 +03:00
committed by bugmaster
parent 695c6eed26
commit 5174095875
186 changed files with 1382 additions and 1466 deletions

View File

@@ -3025,11 +3025,11 @@ Handle( Poly_Triangulation ) CalculationOfSphere( double X , double Y , double Z
Nor = gp_Dir(eqPlan);
else
Nor = gp_Dir(0., 0., 1.);
Standard_Integer j = (i - PointsOfArray.Lower()) * 3;
Normals->SetValue(j + 1, (Standard_ShortReal)Nor.X());
Normals->SetValue(j + 2, (Standard_ShortReal)Nor.Y());
Normals->SetValue(j + 3, (Standard_ShortReal)Nor.Z());
Standard_Integer k = (i - PointsOfArray.Lower()) * 3;
Normals->SetValue(k + 1, (Standard_ShortReal)Nor.X());
Normals->SetValue(k + 2, (Standard_ShortReal)Nor.Y());
Normals->SetValue(k + 3, (Standard_ShortReal)Nor.Z());
}
delete pc;
@@ -3922,8 +3922,8 @@ static Standard_Integer VConnect (Draw_Interpretor& /*di*/,
}
else
{
Standard_CString aName = anOriginObjectName.ToCString();
TopoDS_Shape aTDShape = DBRep::Get (aName);
Standard_CString aOriginName = anOriginObjectName.ToCString();
TopoDS_Shape aTDShape = DBRep::Get (aOriginName);
if (aTDShape.IsNull())
{
std::cout << "vconnect error: object " << anOriginObjectName << " doesn't exist\n";
@@ -4028,8 +4028,8 @@ static Standard_Integer VConnectTo (Draw_Interpretor& /*di*/,
}
else
{
Standard_CString aName = anOriginObjectName.ToCString();
TopoDS_Shape aTDShape = DBRep::Get (aName);
Standard_CString aOriginName = anOriginObjectName.ToCString();
TopoDS_Shape aTDShape = DBRep::Get (aOriginName);
if (aTDShape.IsNull())
{
std::cout << "vconnect error: object " << anOriginObjectName << " doesn't exist\n";
@@ -4274,8 +4274,8 @@ static Standard_Integer VListConnected (Draw_Interpretor& /*di*/,
{
if (GetMapOfAIS().IsBound1 (anIter.Value()))
{
TCollection_AsciiString aName = GetMapOfAIS().Find1 (anIter.Value());
std::cout << aCounter << ") " << aName << " (" << anIter.Value()->DynamicType()->Name() << ")";
TCollection_AsciiString aCuurrentName = GetMapOfAIS().Find1 (anIter.Value());
std::cout << aCounter << ") " << aCuurrentName << " (" << anIter.Value()->DynamicType()->Name() << ")";
}
std::cout << aCounter << ") " << anIter.Value()->DynamicType()->Name();

View File

@@ -333,12 +333,12 @@ static int ParseDimensionParams (Standard_Integer theArgNum,
}
else if (aParam.IsEqual ("-arrow"))
{
TCollection_AsciiString aParam (theArgVec[++anIt]);
aParam.LowerCase();
TCollection_AsciiString aLocalParam(theArgVec[++anIt]);
aLocalParam.LowerCase();
if (aParam == "external") { theAspect->SetArrowOrientation (Prs3d_DAO_External); }
if (aParam == "internal") { theAspect->SetArrowOrientation (Prs3d_DAO_Internal); }
if (aParam == "fit") { theAspect->SetArrowOrientation (Prs3d_DAO_Fit); }
if (aLocalParam == "external") { theAspect->SetArrowOrientation (Prs3d_DAO_External); }
if (aLocalParam == "internal") { theAspect->SetArrowOrientation (Prs3d_DAO_Internal); }
if (aLocalParam == "fit") { theAspect->SetArrowOrientation (Prs3d_DAO_Fit); }
}
else if (aParam.IsEqual ("-arrowlength") || aParam.IsEqual ("-arlen"))
{
@@ -366,13 +366,13 @@ static int ParseDimensionParams (Standard_Integer theArgNum,
}
else if (aParam.IsEqual ("-extension"))
{
TCollection_AsciiString aParam (theArgVec[++anIt]);
if (!aParam.IsRealValue())
TCollection_AsciiString aLocalParam(theArgVec[++anIt]);
if (!aLocalParam.IsRealValue())
{
std::cerr << "Error: extension size for dimension should be real value.\n";
return 1;
}
theAspect->SetExtensionSize (Draw::Atof (aParam.ToCString()));
theAspect->SetExtensionSize (Draw::Atof (aLocalParam.ToCString()));
}
else if (aParam.IsEqual ("-plane"))
{
@@ -401,37 +401,37 @@ static int ParseDimensionParams (Standard_Integer theArgNum,
}
else if (aParam.IsEqual ("-flyout"))
{
TCollection_AsciiString aParam (theArgVec[++anIt]);
if (!aParam.IsRealValue())
TCollection_AsciiString aLocalParam(theArgVec[++anIt]);
if (!aLocalParam.IsRealValue())
{
std::cerr << "Error: flyout for dimension should be real value.\n";
return 1;
}
theRealParams.Bind ("flyout", Draw::Atof (aParam.ToCString()));
theRealParams.Bind ("flyout", Draw::Atof (aLocalParam.ToCString()));
}
else if (aParam.IsEqual ("-value"))
{
TCollection_AsciiString aParam (theArgVec[++anIt]);
if (!aParam.IsRealValue())
TCollection_AsciiString aLocalParam(theArgVec[++anIt]);
if (!aLocalParam.IsRealValue())
{
std::cerr << "Error: dimension value for dimension should be real value.\n";
return 1;
}
theRealParams.Bind ("value", Draw::Atof (aParam.ToCString()));
theRealParams.Bind ("value", Draw::Atof (aLocalParam.ToCString()));
}
else if (aParam.IsEqual ("-modelunits"))
{
TCollection_AsciiString aParam (theArgVec[++anIt]);
TCollection_AsciiString aLocalParam(theArgVec[++anIt]);
theStringParams.Bind ("modelunits", aParam);
theStringParams.Bind ("modelunits", aLocalParam);
}
else if (aParam.IsEqual ("-dispunits"))
{
TCollection_AsciiString aParam (theArgVec[++anIt]);
TCollection_AsciiString aLocalParam(theArgVec[++anIt]);
theStringParams.Bind ("dispunits", aParam);
theStringParams.Bind ("dispunits", aLocalParam);
}
else
{

View File

@@ -597,10 +597,10 @@ TCollection_AsciiString ViewerTest::ViewerInit (const Standard_Integer thePxLeft
// Change name of current active window
if (!ViewerTest::CurrentView().IsNull())
{
TCollection_AsciiString aTitle("3D View - ");
aTitle = aTitle
TCollection_AsciiString anActiveWindowTitle("3D View - ");
anActiveWindowTitle = anActiveWindowTitle
+ ViewerTest_myViews.Find2 (ViewerTest::CurrentView());
SetWindowTitle (ViewerTest::CurrentView()->Window(), aTitle.ToCString());
SetWindowTitle (ViewerTest::CurrentView()->Window(), anActiveWindowTitle.ToCString());
}
// Create viewer
@@ -3566,14 +3566,14 @@ static int VColorScale (Draw_Interpretor& theDI,
std::cout << "Error: wrong syntax at argument '" << anArg << "'!\n";
return 1;
}
TCollection_AsciiString anArg (theArgVec[anArgIter + 1]);
if (!anArg.IsIntegerValue())
TCollection_AsciiString aFontArg(theArgVec[anArgIter + 1]);
if (!aFontArg.IsIntegerValue())
{
std::cout << "Error: HeightFont value should be integer!\n";
return 1;
}
aTextHeight = anArg.IntegerValue();
aTextHeight = aFontArg.IntegerValue();
anArgIter += 1;
}
else if (aFlag == "-textpos")
@@ -3583,27 +3583,27 @@ static int VColorScale (Draw_Interpretor& theDI,
std::cout << "Error: wrong syntax at argument '" << anArg << "'!\n";
return 1;
}
TCollection_AsciiString anArg (theArgVec[++anArgIter]);
anArg.LowerCase();
if (anArg == "none")
TCollection_AsciiString aTextPosArg(theArgVec[++anArgIter]);
aTextPosArg.LowerCase();
if (aTextPosArg == "none")
{
aLabPosition = Aspect_TOCSP_NONE;
}
else if (anArg == "left")
else if (aTextPosArg == "left")
{
aLabPosition = Aspect_TOCSP_LEFT;
}
else if (anArg == "right")
else if (aTextPosArg == "right")
{
aLabPosition = Aspect_TOCSP_RIGHT;
}
else if (anArg == "center")
else if (aTextPosArg == "center")
{
aLabPosition = Aspect_TOCSP_CENTER;
}
else
{
std::cout << "Error: unknown position '" << anArg << "'!\n";
std::cout << "Error: unknown position '" << aTextPosArg << "'!\n";
return 1;
}
}