1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0023599: Some MFC samples are crached during launching

Fixing compiler warnings in MFC samples (MSVC compiler)
File .gitignore modified to ignore files generated by VS 2012
This commit is contained in:
abv 2012-12-07 10:31:38 +04:00
parent bf75be9867
commit 23bbd9d392
4 changed files with 14 additions and 20 deletions

8
.gitignore vendored
View File

@ -10,8 +10,10 @@
/drv
/inc
/work
/win32
/win64
# standard names of directories for objects and binaries on Windows
win32
win64
# project files and artifacts
/adm/msvc
@ -19,9 +21,11 @@
/adm/lin
/adm/mac
/adm/make
/adm/cmake
*.vcproj*user
*.ncb
*.suo
*.sdf
# test results
/results*

View File

@ -132,6 +132,8 @@ void COffsetDlg::SetOffsets(Standard_Real theFactor, Standard_Real theUnits)
TCollection_AsciiString Message;
Standard_Boolean OneOrMoreCurrentIsDisplayed=false;
Standard_ShortReal aFactor = (Standard_ShortReal)theFactor;
Standard_ShortReal aUnits = (Standard_ShortReal)theUnits;
for (aAISContext->InitCurrent();aAISContext->MoreCurrent ();aAISContext->NextCurrent ())
if (aAISContext->IsDisplayed(aAISContext->Current())) OneOrMoreCurrentIsDisplayed=true;
@ -139,40 +141,40 @@ void COffsetDlg::SetOffsets(Standard_Real theFactor, Standard_Real theUnits)
if(OneOrMoreCurrentIsDisplayed){
if((aAISContext->IsCurrent(aOverlappedBox) || aAISContext->IsCurrent(aBox))
&& aAISContext->IsDisplayed(aOverlappedBox)){
aOverlappedBox->SetPolygonOffsets(Aspect_POM_Fill,theFactor,theUnits);
aOverlappedBox->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits);
Message = "Box2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n";
//myDoc -> AddTextInDialog(Message);
}
if((aAISContext->IsCurrent(aOverlappedCylinder) || aAISContext->IsCurrent(aCylinder))
&& aAISContext->IsDisplayed(aOverlappedCylinder)){
aOverlappedCylinder->SetPolygonOffsets(Aspect_POM_Fill,theFactor,theUnits);
aOverlappedCylinder->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits);
Message = Message + "Cylinder2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n";
//myDoc -> AddTextInDialog(Message);
}
if((aAISContext->IsCurrent(aOverlappedSphere) || aAISContext->IsCurrent(aSphere))
&& aAISContext->IsDisplayed(aOverlappedSphere)){
aOverlappedSphere->SetPolygonOffsets(Aspect_POM_Fill,theFactor,theUnits);
aOverlappedSphere->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits);
Message = Message + "Sphere2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n";
//myDoc -> AddTextInDialog(Message);
}
}
else{
if(aAISContext->IsDisplayed(aOverlappedBox)){
aOverlappedBox->SetPolygonOffsets(Aspect_POM_Fill,theFactor,theUnits);
aOverlappedBox->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits);
Message = Message + "Box2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n";
//myDoc -> AddTextInDialog(Message);
}
if(aAISContext->IsDisplayed(aOverlappedCylinder)){
aOverlappedCylinder->SetPolygonOffsets(Aspect_POM_Fill,theFactor,theUnits);
aOverlappedCylinder->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits);
Message = Message + "Cylinder2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n";
//myDoc -> AddTextInDialog(Message);
}
if(aAISContext->IsDisplayed(aOverlappedSphere)){
aOverlappedSphere->SetPolygonOffsets(Aspect_POM_Fill,theFactor,theUnits);
aOverlappedSphere->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits);
Message = Message + "Sphere2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n";
//myDoc -> AddTextInDialog(Message);
}

View File

@ -1,12 +1,6 @@
// NewBoxDlg.cpp : implementation file
//
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "stdafx.h"
#include "NewBoxDlg.h"

View File

@ -1,12 +1,6 @@
// NewCylDlg.cpp : implementation file
//
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "stdafx.h"
#include "NewCylDlg.h"