0027068: Coding - eliminate VC++ 14 compiler warnings in MFC samples
authorabv <abv@opencascade.com>
Sat, 9 Jan 2016 06:33:40 +0000 (09:33 +0300)
committerabv <abv@opencascade.com>
Mon, 11 Jan 2016 22:55:32 +0000 (01:55 +0300)
Code is corrected to avoid compiler warnings

samples/mfc/standard/01_Geometry/src/GeomSources.cpp
samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp
samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp
samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp
samples/mfc/standard/Common/DimensionDlg.cpp
samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp
samples/mfc/standard/Common/ImportExport/ImportExport.cpp
samples/mfc/standard/Common/Winmain.cpp

index 79f44ce..b59cd3d 100755 (executable)
@@ -1440,8 +1440,7 @@ Handle(Geom2d_BSplineCurve) SPL3 = anInterpolation2.Curve();         \n\
   AddSeparator(aDoc,Message);
   //--------------------------------------------------------------
   TCollection_AsciiString aString;
-       Standard_Integer i;
-  for(i = array.Lower();i<=array.Upper();i++)
+  for(int i = array.Lower();i<=array.Upper();i++)
   {
     gp_Pnt2d P = array(i);
     TCollection_AsciiString Message2 (i);
@@ -1455,7 +1454,7 @@ Handle(Geom2d_BSplineCurve) SPL3 = anInterpolation2.Curve();         \n\
     aString = "harray ";aString += Message2; 
     DisplayPoint(aDoc,P,aString.ToCString(),false,0.5);
   }
-  for( i = harray2->Lower();i<=harray2->Upper();i++)
+  for( int i = harray2->Lower();i<=harray2->Upper();i++)
   {
     gp_Pnt2d P = harray2->Value(i);
     TCollection_AsciiString Message2 (i);
@@ -1881,10 +1880,10 @@ void GeomSources::gpTest26(CGeometryDoc* aDoc)
   TColgp_Array2OfPnt2d aSolutionArray(1,NbExtrema,1,2);
   for(int i=1;i <= NbExtrema; i++)
   {                                  
-    gp_Pnt2d P1,P2;
-    ECC2.Points(i,P1,P2);
-    aSolutionArray(i,1) = P1;
-    aSolutionArray(i,2) = P2;
+    gp_Pnt2d P1x,P2x;
+    ECC2.Points(i,P1x,P2x);
+    aSolutionArray(i,1) = P1x;
+    aSolutionArray(i,2) = P2x;
   }            
 
   //==============================================================
@@ -1955,17 +1954,17 @@ for(int i=1;i <= NbExtrema; i++)   {                                  \n\
 
  for(int i=1;i <= NbExtrema; i++)
  {
-   gp_Pnt2d P1 =aSolutionArray(i,1);
+   gp_Pnt2d P1x =aSolutionArray(i,1);
 
    TCollection_AsciiString Message2 (i);
    aString = "P1_";
    aString += Message2; 
-   DisplayPoint(aDoc,P1,aString.ToCString(),false,0.7*i);
+   DisplayPoint(aDoc,P1x,aString.ToCString(),false,0.7*i);
 
-   gp_Pnt2d P2 = aSolutionArray(i,2);
+   gp_Pnt2d P2x = aSolutionArray(i,2);
 
    Handle(Geom2d_TrimmedCurve) SolutionCurve =
-     GCE2d_MakeSegment(P1,P2);
+     GCE2d_MakeSegment(P1x,P2x);
    Handle(ISession2D_Curve) aSolutionCurve = new ISession2D_Curve(SolutionCurve);
    aDoc->GetISessionContext()->Display(aSolutionCurve, Standard_False);
  }
@@ -2162,10 +2161,9 @@ void GeomSources::gpTest30(CGeometryDoc* aDoc)
   gp_Circ2d C = gce_MakeCirc2d (P1,P2,P3);
   GccEnt_QualifiedCirc QC = GccEnt::Outside(C);
   GccAna_Lin2d2Tan LT (QC,P4,Precision::Confusion());
-  Standard_Integer NbSol = 0;
   if (LT.IsDone())
   {
-    NbSol = LT.NbSolutions();
+    Standard_Integer NbSol = LT.NbSolutions();
     for(Standard_Integer k=1; k<=NbSol; k++)
     {
       gp_Lin2d L = LT.ThisSolution(k);
@@ -2214,14 +2212,14 @@ if (LT.IsDone())                                     \n\
     {
       gp_Lin2d L = LT.ThisSolution(k);
       Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-10,20);
-      Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aLine);
-      aDoc->GetISessionContext()->Display(aCurve, Standard_False);
+      Handle(ISession2D_Curve) aCurveN = new ISession2D_Curve(aLine);
+      aDoc->GetISessionContext()->Display(aCurveN, Standard_False);
     }
   }
   Message += " C is Blue \n\n";
   Message += "LT.IsDone() = "; 
   if (LT.IsDone())  Message += "True \n"; else Message += "False \n";
-  TCollection_AsciiString Message2 (NbSol);
+  TCollection_AsciiString Message2 (LT.NbSolutions());
   Message += "NbSol       = "; Message += Message2      ; Message += "\n";
 
   PostProcess(aDoc,ID_BUTTON_Test_30,TheDisplayType,Message);
@@ -2324,9 +2322,9 @@ if (TR.IsDone())                                                              \n
     for (Standard_Integer k=1; k<=NbSol; k++)
     {
       circ = TR.ThisSolution(k);
-      Handle(Geom2d_Circle) aCircle = new Geom2d_Circle(circ);
-      Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aCircle);
-      aDoc->GetISessionContext()->Display(aCurve, Standard_False);
+      Handle(Geom2d_Circle) aCircleN = new Geom2d_Circle(circ);
+      Handle(ISession2D_Curve) aCurveN = new ISession2D_Curve(aCircleN);
+      aDoc->GetISessionContext()->Display(aCurveN, Standard_False);
 
       // find the solution circle
       TR.Tangency1(k,parsol,pararg,tangentpoint1);
@@ -2682,14 +2680,14 @@ if(CS.IsDone())                                             \n\
   Standard_Integer k;
   if(CS.IsDone())
   {
-    Standard_Integer NbSeg = CS.NbSegments();
+    NbSeg = CS.NbSegments();
     for (k=1; k<=NbSeg; k++)
     {
       TCollection_AsciiString Message2 (k);
       segment = CS.Segment(k);
       aString = "S_";aString += Message2;
-      Handle(ISession_Curve) aCurve = new ISession_Curve(segment);
-      aDoc->GetAISContext()->Display(aCurve, Standard_False);
+      Handle(ISession_Curve) aCurveN = new ISession_Curve(segment);
+      aDoc->GetAISContext()->Display(aCurveN, Standard_False);
     }
 
     for ( k=1; k<=NbPoints; k++)
@@ -2881,9 +2879,10 @@ if (PE.IsSpace())  { /* ... */  }                                \n\
   TCollection_AsciiString aString;
   for(Standard_Integer i = anArrayofPnt.Lower();i<=anArrayofPnt.Upper();i++){
     TCollection_AsciiString Message2(i);
-    gp_Pnt P = anArrayofPnt(i);
-    aString = "P";aString += Message2; 
-    DisplayPoint(aDoc,P,aString.ToCString(),false,0.5);
+    gp_Pnt aP = anArrayofPnt(i);
+    aString = "P";
+    aString += Message2; 
+    DisplayPoint(aDoc,aP,aString.ToCString(),false,0.5);
   }
 
   Message += " PE.IsPoint()  = ";  if (PE.IsPoint()) Message += "True \n";  else Message += "False\n";
index 9932bf0..0bd19ee 100755 (executable)
@@ -21,9 +21,9 @@
 #include <Geom_Plane.hxx>
 #include <BRepTools.hxx>
 
-Handle(AIS_Shape) AIS1;
-TopoDS_Face F1,F2;
-TopoDS_Edge E1,E2;
+static Handle(AIS_Shape) AIS1;
+static TopoDS_Face THE_F1, THE_F2;
+static TopoDS_Edge THE_E1, THE_E2;
 
 /////////////////////////////////////////////////////////////////////////////
 // CModelingDoc
@@ -4756,10 +4756,10 @@ void CModelingDoc::OnFillwithtang()
        if (myAISContext->MoreCurrent()) {
                Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->Current());
                try {
-                       F1 = TopoDS::Face(ashape->Shape());
+                  THE_F1 = TopoDS::Face(ashape->Shape());
                }
            catch(Standard_Failure){}
-               if (F1.IsNull())
+               if (THE_F1.IsNull())
                 {
                     AfxMessageBox (L"Current object is not a face!\n\
 Please, select a face to continue\nthe creation of a tangent surface.");
@@ -4807,7 +4807,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
        if (myState == SELECT_EDGE_PLATE_TGTES_1) {
                myAISContext->InitSelected();
                if (myAISContext->MoreSelected()) {
-                       E1 = TopoDS::Edge(myAISContext->SelectedShape());
+                       THE_E1 = TopoDS::Edge(myAISContext->SelectedShape());
                        myAISContext->CloseLocalContext();
                        myState = SELECT_EDGE_PLATE_TGTES_2;
                        
@@ -4821,7 +4821,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
                                        myAISContext->SetCurrentObject(aLI.First());
                                myAISContext->InitCurrent();
                                Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->Current());
-                               F2 = TopoDS::Face(ashape->Shape());
+                               THE_F2 = TopoDS::Face(ashape->Shape());
                                myAISContext->OpenLocalContext();
                                myAISContext->Activate(ashape,2);
                                myState = SELECT_EDGE_PLATE_TGTES_3;
@@ -4845,7 +4845,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
                myAISContext->InitCurrent();
                if (myAISContext->MoreCurrent()) {
                        Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->Current());
-                       F2 = TopoDS::Face(ashape->Shape());
+                       THE_F2 = TopoDS::Face(ashape->Shape());
                        myAISContext->OpenLocalContext();
                        myAISContext->Activate(ashape,2);
                        myState = SELECT_EDGE_PLATE_TGTES_3;
@@ -4857,7 +4857,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
        else if (myState == SELECT_EDGE_PLATE_TGTES_3) {
                myAISContext->InitSelected();
                if (myAISContext->MoreSelected()) {
-                       E2 = TopoDS::Edge(myAISContext->SelectedShape());
+                       THE_E2 = TopoDS::Edge(myAISContext->SelectedShape());
                        myAISContext->CloseLocalContext();
 
                        Standard_Integer i, nbPntsOnFaces=10;
@@ -4868,9 +4868,9 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
                        gp_Pnt P, PP;
 
                        //get the pcurve, curve and surface
-                       BRepAdaptor_Curve   Curve3d1(E1), Curve3d2(E2);
-                       BRepAdaptor_Curve2d Curve2d1(E1,F1), Curve2d2(E2,F2);
-                       BRepAdaptor_Surface Surf1(F1), Surf2(F2);
+                       BRepAdaptor_Curve   Curve3d1(THE_E1), Curve3d2(THE_E2);
+                       BRepAdaptor_Curve2d Curve2d1(THE_E1,THE_F1), Curve2d2(THE_E2,THE_F2);
+                       BRepAdaptor_Surface Surf1(THE_F1), Surf2(THE_F2);
 
                        //compute the average plane : initial surface
                        Handle(TColgp_HArray1OfPnt) theTanPoints = new
@@ -4981,12 +4981,12 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
                        // Face building ... 
                        Handle(Geom2d_Curve)C1,C2,C3,C4;
                        Handle(Geom_Curve)C;
-                       C = BRep_Tool::Curve(E1,First,Last);
+                       C = BRep_Tool::Curve(THE_E1,First,Last);
                        TolProj = 0.01;
                        C1 = GeomProjLib::Curve2d(C,First,Last,theSurface,TolProj);
                        TopoDS_Edge Ed1 = BRepBuilderAPI_MakeEdge(C1,theSurface).Edge();
 
-                       C = BRep_Tool::Curve(E2,First,Last);
+                       C = BRep_Tool::Curve(THE_E2,First,Last);
                        TolProj = 0.01;
                        C3 = GeomProjLib::Curve2d(C,First,Last,theSurface,TolProj);
                        TopoDS_Edge Ed3 = BRepBuilderAPI_MakeEdge(C3,theSurface).Edge();
@@ -5005,10 +5005,10 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
                        if (!BRepAlgo::IsValid(theFace)){
                                C2 = GCE2d_MakeSegment(C1->Value(C1->LastParameter()),
                                                                                C3->Value(C3->FirstParameter())).Value();
-                               TopoDS_Edge Ed2 = BRepBuilderAPI_MakeEdge(C2,theSurface).Edge();
+                               Ed2 = BRepBuilderAPI_MakeEdge(C2,theSurface).Edge();
                                C4 = GCE2d_MakeSegment(C3->Value(C3->LastParameter()),
                                                                C1->Value(C1->FirstParameter())).Value();
-                               TopoDS_Edge Ed4 = BRepBuilderAPI_MakeEdge(C4,theSurface).Edge();
+                               Ed4 = BRepBuilderAPI_MakeEdge(C4,theSurface).Edge();
                                Ed3.Reverse();
                                theWire = BRepBuilderAPI_MakeWire(Ed1,Ed2,Ed3,Ed4);
                                theFace = BRepBuilderAPI_MakeFace(theWire);
index 4213bb9..9499021 100755 (executable)
@@ -294,8 +294,8 @@ void TexturesExt_Presentation::sampleTerrain()
   
   gp_Trsf aMoveTrsf;
   gp_Ax3 New(gp_Pnt(-30,-30, 0),gp_Dir(0,0,1));
-  gp_Ax3 Current(aPnt,gp_Dir(0,0,1));
-  aMoveTrsf.SetDisplacement(Current, New);
+  gp_Ax3 aCurrent(aPnt,gp_Dir(0,0,1));
+  aMoveTrsf.SetDisplacement(aCurrent, New);
 
   gp_Trsf aScaleTrsf;
   aScaleTrsf.SetScale(aPnt,0.0075);
index d1be201..f901009 100755 (executable)
@@ -192,7 +192,6 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
   aBuild1.MakeCompound(aComp1);
   aBuild2.MakeCompound(aComp2);
 
-  TopTools_SequenceOfShape aVertices;
   Standard_Integer aCount = 0;
   Standard_Integer aNumOfNodes = 0;
   Standard_Integer aNumOfTriangles = 0;
index 8fd754f..e4e3648 100644 (file)
@@ -381,10 +381,10 @@ void CDimensionDlg::OnBnClickedDimLength()
 {
   // Update parameters
   UpdateStandardModeForLength ();
-  (CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_SHOW);
-  (CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
-  (CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
-  (CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_LengthTab)->ShowWindow (SW_SHOW);
+  GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
 
   UpdateUnitsListForLength ();
   ((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (15);
@@ -399,10 +399,10 @@ void CDimensionDlg::OnBnClickedDimAngle()
 {
   // Update parameters
   UpdateStandardModeForAngle();
-  (CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
-  (CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_SHOW);
-  (CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
-  (CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_AngleTab)->ShowWindow (SW_SHOW);
+  GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
 
   UpdateUnitsListForAngle();
   ((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (15);
@@ -420,10 +420,10 @@ void CDimensionDlg::OnBnClickedDimDiameter()
   myAISContext->OpenLocalContext();
   myAISContext->ActivateStandardMode (TopAbs_EDGE);
 
-  (CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
-  (CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
-  (CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
-  (CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_SHOW);
+  GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_SHOW);
 
   UpdateUnitsListForLength();
   ((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (0);
@@ -440,10 +440,10 @@ void CDimensionDlg::OnBnClickedDimRadius()
   myAISContext->CloseAllContexts();
   myAISContext->OpenLocalContext();
   myAISContext->ActivateStandardMode (TopAbs_EDGE);
-  (CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
-  (CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
-  (CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_SHOW);
-  (CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
+  GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_SHOW);
+  GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
 
   UpdateUnitsListForLength();
   ((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (0);
index cba3ecf..378deba 100755 (executable)
@@ -184,39 +184,39 @@ void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*the
 
     if (DrawHiddenLine)
     {
-      Handle(Prs3d_LineAspect) aLineAspectHighlighted = new Prs3d_LineAspect(Quantity_NOC_RED,
+      Handle(Prs3d_LineAspect) aLineAspectHighlightedHLR = new Prs3d_LineAspect(Quantity_NOC_RED,
         Aspect_TOL_DOTDASH,2);
-      Handle(Prs3d_LineAspect) aLineAspect = new Prs3d_LineAspect(Quantity_NOC_BLUE1,
+      Handle(Prs3d_LineAspect) aLineAspectHLR = new Prs3d_LineAspect(Quantity_NOC_BLUE1,
         Aspect_TOL_DOTDASH,1);
 
       switch(aMode)
       {
       case (6):
         {
-          DrawCompound(thePresentation, HCompound, aLineAspectHighlighted);
+          DrawCompound(thePresentation, HCompound, aLineAspectHighlightedHLR);
           break;
         }
       case (7):
         {
-          DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHighlighted);
+          DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHighlightedHLR);
           break;
         }
       case (8):
         {
-          DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHighlighted);
+          DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHighlightedHLR);
           break;
         }
       case (9):
         {
-          DrawCompound(thePresentation, OutLineHCompound, aLineAspectHighlighted);
+          DrawCompound(thePresentation, OutLineHCompound, aLineAspectHighlightedHLR);
           break;
         }
       default:
         {
-          DrawCompound(thePresentation, HCompound, aLineAspect);
-          DrawCompound(thePresentation, Rg1LineHCompound, aLineAspect);
-          DrawCompound(thePresentation, RgNLineHCompound, aLineAspect);
-          DrawCompound(thePresentation, OutLineHCompound, aLineAspect);
+          DrawCompound(thePresentation, HCompound, aLineAspectHLR);
+          DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHLR);
+          DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHLR);
+          DrawCompound(thePresentation, OutLineHCompound, aLineAspectHLR);
         }
       }
     }
@@ -267,45 +267,45 @@ void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*the
 
     if (DrawHiddenLine)
     {
-      Handle(Prs3d_LineAspect) aLineAspectHighlighted = new Prs3d_LineAspect(Quantity_NOC_RED,
+      Handle(Prs3d_LineAspect) aLineAspectHighlightedHLR = new Prs3d_LineAspect(Quantity_NOC_RED,
         Aspect_TOL_DOT,2);
-      Handle(Prs3d_LineAspect) aLineAspect = new Prs3d_LineAspect(Quantity_NOC_ALICEBLUE,
-        Aspect_TOL_DOT,1);  
 
-            switch(aMode)
+      switch (aMode)
       {
       case (6):
         {
-          DrawCompound(thePresentation, HCompound, aLineAspectHighlighted);
+          DrawCompound(thePresentation, HCompound, aLineAspectHighlightedHLR);
           break;
         }
       case (7):
         {
-          DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHighlighted);
+          DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHighlightedHLR);
           break;
         }
       case (8):
         {
-          DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHighlighted);
+          DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHighlightedHLR);
           break;
         }
       case (9):
         {
-          DrawCompound(thePresentation, OutLineHCompound, aLineAspectHighlighted);
+          DrawCompound(thePresentation, OutLineHCompound, aLineAspectHighlightedHLR);
           break;
         }
       case (10):
         {
-          DrawCompound(thePresentation, IsoLineHCompound, aLineAspectHighlighted);
+          DrawCompound(thePresentation, IsoLineHCompound, aLineAspectHighlightedHLR);
           break;
         }
       default:
         {
-          DrawCompound(thePresentation, HCompound, aLineAspect);
-          DrawCompound(thePresentation, Rg1LineHCompound, aLineAspect);
-          DrawCompound(thePresentation, RgNLineHCompound, aLineAspect);
-          DrawCompound(thePresentation, OutLineHCompound, aLineAspect);
-          DrawCompound(thePresentation, IsoLineHCompound, aLineAspect);
+          Handle(Prs3d_LineAspect) aLineAspectHLR =
+            new Prs3d_LineAspect(Quantity_NOC_ALICEBLUE, Aspect_TOL_DOT, 1);
+          DrawCompound(thePresentation, HCompound, aLineAspectHLR);
+          DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHLR);
+          DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHLR);
+          DrawCompound(thePresentation, OutLineHCompound, aLineAspectHLR);
+          DrawCompound(thePresentation, IsoLineHCompound, aLineAspectHLR);
         }
       }
     }
index 0b239fd..36bf6bc 100755 (executable)
@@ -728,15 +728,15 @@ Standard_Boolean CImportExport::SaveVRML(const Standard_CString&
     VrmlData_ShapeConvert converter(scene/*, 0.001*/); // from mm to meters 
     Standard_Integer iShape = 1; // Counter of shapes
 
-       for ( int i = 1; i <= aHSequenceOfShape->Length(); i++ )
-       {
+    for (int i = 1; i <= aHSequenceOfShape->Length(); i++)
+    {
         // Shape
-               TopoDS_Shape shape = aHSequenceOfShape->Value( i );
-               if ( shape.IsNull() )
-               {
-                       ReturnMessage += " Error : Invalid shape \n";
-                       ReturnValue = Standard_False;
-                       continue;
+        TopoDS_Shape shape = aHSequenceOfShape->Value(i);
+        if (shape.IsNull())
+        {
+          ReturnMessage += " Error : Invalid shape \n";
+          ReturnValue = Standard_False;
+          continue;
         }
 
         // Color
@@ -793,8 +793,8 @@ Standard_Boolean CImportExport::SaveVRML(const Standard_CString&
                 Handle(VrmlData_Node) node = itr.Value();
                 if (node->DynamicType() == STANDARD_TYPE(VrmlData_ShapeNode))
                 {
-                    Handle(VrmlData_ShapeNode) shape = Handle(VrmlData_ShapeNode)::DownCast(node);
-                    shape->SetAppearance(appearance);
+                    Handle(VrmlData_ShapeNode) aShape = Handle(VrmlData_ShapeNode)::DownCast(node);
+                    aShape->SetAppearance(appearance);
                 }
                 else if (itr.Value()->DynamicType() == STANDARD_TYPE(VrmlData_Group))
                 {
index 9951bd1..b86db10 100755 (executable)
@@ -43,7 +43,7 @@ int AFXAPI AfxWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
   _SYSTEM_INFO lps;
   GetSystemInfo(&lps);
   rep = AllocConsole();
-  hCrt = _open_osfhandle((long) GetStdHandle(STD_OUTPUT_HANDLE),_O_TEXT);
+  hCrt = _open_osfhandle((intptr_t) GetStdHandle(STD_OUTPUT_HANDLE),_O_TEXT);
   hf = _fdopen( hCrt, "w" );
   *stdout = *hf;
   // stop the buffer on stdout