1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0028838: Configuration - undefine macros coming from X11 headers in place of collision

The macros Status, Convex, Opposite, FillSolid (coming from X11 headers)
are now undefined in place of definition of methods with same name in OCCT headers.
The usage of variables with name Status is now avoided.

GL_GLEXT_LEGACY is now defined only if not already defined.

The macros AddPrinter (coming from WinAPI headers) is now undefined
within Message_Messenger class definition having method with the same name.
CurrentDirectory macro is now undefined in OSD_Process.hxx.
This commit is contained in:
kgv
2017-02-03 23:27:02 +04:00
committed by bugmaster
parent e3d02d1f84
commit 9fd2d2c382
103 changed files with 598 additions and 482 deletions

View File

@@ -158,9 +158,9 @@ TopoDS_Shape DNaming::CurrentShape (const Standard_CString LabelName,
TCollection_AsciiString DNaming::GetEntry (const TopoDS_Shape& Shape,
const Handle(TDF_Data)& DF,
Standard_Integer& Status)
Standard_Integer& theStatus)
{
Status = 0;
theStatus = 0;
//Handle(TNaming_UsedShapes) US;
//DF->Root().FindAttribute(TNaming_UsedShapes::GetID(),US);
@@ -170,11 +170,11 @@ TCollection_AsciiString DNaming::GetEntry (const TopoDS_Shape& Shape,
Standard_Integer Transdef;
TDF_Label Lab = TNaming_Tool::Label (DF->Root(), Shape,Transdef);
TCollection_AsciiString entry; TDF_Tool::Entry(Lab,entry);
//Update Status;
//Update theStatus;
TNaming_Iterator it(Lab,DF->Transaction());
for (; it.More(); it.Next()) {
Status++;
if (Status == 2) break;
theStatus++;
if (theStatus == 2) break;
}
return entry;
}

View File

@@ -105,10 +105,10 @@ public:
Standard_EXPORT static void GetShape (const Standard_CString ShapeEntry, const Handle(TDF_Data)& Data, TopTools_ListOfShape& Shapes);
//! Status = 0 Not found,
//! Status = 1 One shape,
//! Status = 2 More than one shape.
Standard_EXPORT static TCollection_AsciiString GetEntry (const TopoDS_Shape& Shape, const Handle(TDF_Data)& Data, Standard_Integer& Status);
//! theStatus = 0 Not found,
//! theStatus = 1 One shape,
//! theStatus = 2 More than one shape.
Standard_EXPORT static TCollection_AsciiString GetEntry (const TopoDS_Shape& Shape, const Handle(TDF_Data)& Data, Standard_Integer& theStatus);
//! Loads the Shape to DF
Standard_EXPORT static void LoadImportedShape (const TDF_Label& theResultLabel, const TopoDS_Shape& theShape);

View File

@@ -160,14 +160,14 @@ static Standard_Integer Getentry (Draw_Interpretor& di, Standard_Integer n, cons
//di << 0;
return 0;
}
Standard_Integer Status ;
TCollection_AsciiString Name = DNaming::GetEntry(S,ND,Status);
if (Status == 0) {
Standard_Integer aStatus = 0;
TCollection_AsciiString Name = DNaming::GetEntry (S, ND, aStatus);
if (aStatus == 0) {
di <<"E_NoName";
}
else {
di <<Name.ToCString();
if (Status == 2) {
if (aStatus == 2) {
di <<"Several shapes have the same name\n";
}
}
@@ -422,15 +422,14 @@ static Standard_Integer Getcreationentry (Draw_Interpretor& di, Standard_Integer
di <<"E_NoName";
return 0;
}
Standard_Integer Status ;
TCollection_AsciiString Name = DNaming::GetEntry(S,ND,Status);
if (Status == 0) {
Standard_Integer aStatus = 0;
TCollection_AsciiString Name = DNaming::GetEntry (S, ND, aStatus);
if (aStatus == 0) {
di <<"E_NoName";
}
else {
di <<Name.ToCString();
if (Status == 2) {
if (aStatus == 2) {
di <<"Several shapes have the same name\n";
}
}