diff --git a/src/ApproxInt/ApproxInt_MultiLine.gxx b/src/ApproxInt/ApproxInt_MultiLine.gxx index 323c445668..45225b1364 100644 --- a/src/ApproxInt/ApproxInt_MultiLine.gxx +++ b/src/ApproxInt/ApproxInt_MultiLine.gxx @@ -84,7 +84,7 @@ ApproxInt_MultiLine:: U2o(u2o), V2o(v2o) { -#if OCCT_DEBUG +#ifdef OCCT_DEBUG //if(indicemin == indicemax) //{ // cout<<"ApproxInt_MultiLine: indicemin = indicemax = " << indicemin << endl; @@ -123,7 +123,7 @@ ApproxInt_MultiLine:: U1o(u1o), V1o(v1o), U2o(u2o), V2o(v2o) { -#if OCCT_DEBUG +#ifdef OCCT_DEBUG //if(indicemin == indicemax) //{ // cout<<"ApproxInt_MultiLine: indicemin = indicemax = " << indicemin << endl; @@ -554,7 +554,7 @@ ApproxInt_MultiLine P2B=P2C; } -#if OCCT_DEBUG +#ifdef OCCT_DEBUG //if (temp->NbPnts() < NbPntsToInsert + High - Low + 1) //{ // cout<<" *** Pas assez de points entre :"<< diff --git a/src/BRepFill/BRepFill_Draft.cxx b/src/BRepFill/BRepFill_Draft.cxx index 401b08faa9..eb44aca877 100644 --- a/src/BRepFill/BRepFill_Draft.cxx +++ b/src/BRepFill/BRepFill_Draft.cxx @@ -285,7 +285,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, TopExp::Vertices(myWire, Vf, Vl); if (Vf.IsSame(Vl)) myWire.Closed(Standard_True); } -#if DRAW +#ifdef DRAW if (Affich) { DBRep::Set("TheWire", myWire); } @@ -425,7 +425,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, Handle(Geom_Plane) Plan = new (Geom_Plane)(Pt, myDir); Surf = new (Geom_RectangularTrimmedSurface) (Plan,-L, L, -L, L); -#if DRAW +#ifdef DRAW if (Affich) { char* Temp = "ThePlan" ; DrawTrSurf::Set(Temp, Surf); @@ -486,7 +486,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, Handle(Geom_Curve) TC = new (Geom_TrimmedCurve) (L, 0, Length); -#if DRAW +#ifdef DRAW if (Affich > 2) { TC = new (Geom_Circle) (gp::XOY(), Length); } diff --git a/src/BRepFill/BRepFill_Pipe.cxx b/src/BRepFill/BRepFill_Pipe.cxx index 13374944a4..00944ac2f4 100644 --- a/src/BRepFill/BRepFill_Pipe.cxx +++ b/src/BRepFill/BRepFill_Pipe.cxx @@ -300,7 +300,7 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine, RemLoc.Remove(myLast); myLast = RemLoc.GetResult(); -#if DRAW +#ifdef DRAW if (Affich) { DBRep::Set("theprof", TheProf); DBRep::Set("thefirst", myFirst); diff --git a/src/BRepFill/BRepFill_PipeShell.cxx b/src/BRepFill/BRepFill_PipeShell.cxx index e8d408a0a7..b9fbd97435 100644 --- a/src/BRepFill/BRepFill_PipeShell.cxx +++ b/src/BRepFill/BRepFill_PipeShell.cxx @@ -732,7 +732,7 @@ void BRepFill_PipeShell::SetForceApproxC1(const Standard_Boolean ForceApproxC1) } // eap 5 Jun 2002 occ332, end modif } -#if DRAW +#ifdef DRAW if (Affich) { DBRep::Set("PipeFirst", myFirst); DBRep::Set("PipeLast", myLast); diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index 1eba8dbcb5..a9a6d2bdd6 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -625,7 +625,7 @@ static void BuildFace(const Handle(Geom_Surface)& S, } WW = B.Wire(); -#if DRAW +#ifdef DRAW if (Affich) DBRep::Set("wire-on-face", WW); #endif @@ -853,7 +853,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, WithE4 = Standard_True; } -#if DRAW +#ifdef DRAW if (Affich) { DBRep::Set("Fill_Edge1", E1); DBRep::Set("Fill_Edge2", E2); @@ -939,7 +939,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, */ } -#if DRAW +#ifdef DRAW if (Affich) { char* Temp = "Surf_Init" ; DrawTrSurf::Set(Temp, Surf); @@ -1258,7 +1258,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, if (ToReverseResult) Result.Reverse(); -#if DRAW +#ifdef DRAW if (Affich) DBRep::Set("BoucheTrou", Result); #endif @@ -2064,7 +2064,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, return Standard_False; } E = MkE.Edge(); -#if DRAW +#ifdef DRAW if (Affich) { sprintf(name,"Surf_%d", ipath); char* Temp = name; diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx index 7bf2a1d808..429709c3c8 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx @@ -283,7 +283,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read (Standard_IStream& Standard_Integer aShapeSectionPos; // go to ShapeSection theIStream.read ((char*)&aShapeSectionPos, sizeof(Standard_Integer)); -#if DO_INVERSE +#ifdef DO_INVERSE aShapeSectionPos = InverseInt (aShapeSectionPos); #endif #ifdef OCCT_DEBUG @@ -440,7 +440,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree // read the tag of a child label Standard_Integer aTag = BinLDrivers_ENDLABEL; theIS.read ((char*) &aTag, sizeof(Standard_Integer)); -#if DO_INVERSE +#ifdef DO_INVERSE aTag = InverseInt (aTag); #endif @@ -463,7 +463,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree // read the tag of the next child theIS.read ((char*) &aTag, sizeof(Standard_Integer)); -#if DO_INVERSE +#ifdef DO_INVERSE aTag = InverseInt (aTag); #endif } diff --git a/src/BinLDrivers/BinLDrivers_DocumentSection.cxx b/src/BinLDrivers/BinLDrivers_DocumentSection.cxx index d82ef560a1..7810355624 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentSection.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentSection.cxx @@ -133,7 +133,7 @@ void BinLDrivers_DocumentSection::WriteTOC (Standard_OStream& theStream, aBufSize += sizeof(Standard_Integer); // Write the buffer: size + string -#if DO_INVERSE +#ifdef DO_INVERSE aBufSz[0] = InverseInt ((Standard_Integer)aBufSize); #else aBufSz[0] = (Standard_Integer)aBufSize; @@ -185,7 +185,7 @@ void BinLDrivers_DocumentSection::Write (Standard_OStream& theStream, int32_t(myValue[1]), int32_t(myIsPostRead ? 1 : 0) }; -#if DO_INVERSE +#ifdef DO_INVERSE aValInt[0] = InverseInt(aValInt[0]); aValInt[1] = InverseInt(aValInt[1]); aValInt[2] = InverseInt(aValInt[2]); @@ -199,7 +199,7 @@ void BinLDrivers_DocumentSection::Write (Standard_OStream& theStream, myValue[1], uint64_t(myIsPostRead ? 1 : 0) }; -#if DO_INVERSE +#ifdef DO_INVERSE aVal[0] = InverseUint64(aVal[0]); aVal[1] = InverseUint64(aVal[1]); aVal[2] = InverseUint64(aVal[2]); @@ -223,7 +223,7 @@ void BinLDrivers_DocumentSection::ReadTOC char aBuf[512]; Standard_Integer aNameBufferSize; theStream.read ((char *)&aNameBufferSize, sizeof(Standard_Integer)); -#if DO_INVERSE +#ifdef DO_INVERSE aNameBufferSize = InverseSize(aNameBufferSize); #endif if (aNameBufferSize > 0) { @@ -236,7 +236,7 @@ void BinLDrivers_DocumentSection::ReadTOC // Old documents stored file position as 4-bytes values. int32_t aValInt[3]; theStream.read ((char *)&aValInt[0], 3*sizeof(int32_t)); -#if DO_INVERSE +#ifdef DO_INVERSE aValue[0] = InverseInt (aValInt[0]); aValue[1] = InverseInt (aValInt[1]); aValue[2] = InverseInt (aValInt[2]); @@ -249,7 +249,7 @@ void BinLDrivers_DocumentSection::ReadTOC else { theStream.read ((char *)&aValue[0], 3*sizeof(uint64_t)); -#if DO_INVERSE +#ifdef DO_INVERSE aValue[0] = InverseUint64 (aValue[0]); aValue[1] = InverseUint64 (aValue[1]); aValue[2] = InverseUint64 (aValue[2]); diff --git a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx index b5b9006214..bfe167e597 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx @@ -239,7 +239,7 @@ void BinLDrivers_DocumentStorageDriver::WriteSubTree Message_ProgressScope aPS(theRange, "Writing sub tree", 2, true); // Write label header: tag Standard_Integer aTag = theLabel.Tag(); -#if DO_INVERSE +#ifdef DO_INVERSE aTag = InverseInt (aTag); #endif theOS.write ((char*)&aTag, sizeof(Standard_Integer)); @@ -281,7 +281,7 @@ void BinLDrivers_DocumentStorageDriver::WriteSubTree } // Write the end attributes list marker BinLDrivers_Marker anEndAttr = BinLDrivers_ENDATTRLIST; -#if DO_INVERSE +#ifdef DO_INVERSE anEndAttr = (BinLDrivers_Marker) InverseInt (anEndAttr); #endif theOS.write ((char*)&anEndAttr, sizeof(anEndAttr)); @@ -302,7 +302,7 @@ void BinLDrivers_DocumentStorageDriver::WriteSubTree // Write the end label marker BinLDrivers_Marker anEndLabel = BinLDrivers_ENDLABEL; -#if DO_INVERSE +#ifdef DO_INVERSE anEndLabel = (BinLDrivers_Marker) InverseInt (anEndLabel); #endif theOS.write ((char*)&anEndLabel, sizeof(anEndLabel)); diff --git a/src/BinObjMgt/BinObjMgt_Persistent.cxx b/src/BinObjMgt/BinObjMgt_Persistent.cxx index cf3983753f..2bde32394a 100644 --- a/src/BinObjMgt/BinObjMgt_Persistent.cxx +++ b/src/BinObjMgt/BinObjMgt_Persistent.cxx @@ -91,7 +91,7 @@ Standard_OStream& BinObjMgt_Persistent::Write (Standard_OStream& theOS) Standard_Integer *aData = (Standard_Integer*) myData(1); // update data length aData[2] = mySize - BP_HEADSIZE; -#if DO_INVERSE +#ifdef DO_INVERSE aData[0] = InverseInt (aData[0]); aData[1] = InverseInt (aData[1]); aData[2] = InverseInt (aData[2]); @@ -131,13 +131,13 @@ Standard_IStream& BinObjMgt_Persistent::Read (Standard_IStream& theIS) // read TypeId theIS.read ((char*) &aData[0], BP_INTSIZE); -#if DO_INVERSE +#ifdef DO_INVERSE aData[0] = InverseInt (aData[0]); #endif if (theIS && aData[0] > 0) { // read Id and Length theIS.read ((char*)&aData[1], 2 * BP_INTSIZE); -#if DO_INVERSE +#ifdef DO_INVERSE aData[1] = InverseInt (aData[1]); aData[2] = InverseInt (aData[2]); #endif @@ -242,7 +242,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutExtCharacter prepareForPut (BP_EXTCHARSIZE); Standard_ExtCharacter *aData = (Standard_ExtCharacter*) ((char*)myData(myIndex) + myOffset); -#if DO_INVERSE +#ifdef DO_INVERSE *aData = InverseExtChar (theValue); #else *aData = theValue; @@ -262,7 +262,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutInteger alignOffset (BP_INTSIZE, Standard_True); prepareForPut (BP_INTSIZE); Standard_Integer *aData = (Standard_Integer*) ((char*)myData(myIndex) + myOffset); -#if DO_INVERSE +#ifdef DO_INVERSE *aData = InverseInt (theValue); #else *aData = theValue; @@ -283,19 +283,19 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutReal Standard_Integer nbPieces = prepareForPut (BP_REALSIZE); if (nbPieces > 0) { // the value intersects a piece boundary => go a long way -#if DO_INVERSE +#ifdef DO_INVERSE Standard_Integer aStartIndex = myIndex; Standard_Integer aStartOffset = myOffset; #endif putArray ((void*) &theValue, BP_REALSIZE); -#if DO_INVERSE +#ifdef DO_INVERSE inverseRealData (aStartIndex, aStartOffset, BP_REALSIZE); #endif } else { // the value fits in the current piece => put it quickly Standard_Real *aData = (Standard_Real*) ((char*)myData(myIndex) + myOffset); -#if DO_INVERSE +#ifdef DO_INVERSE *aData = InverseReal (theValue); #else *aData = theValue; @@ -316,7 +316,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutShortReal alignOffset (BP_INTSIZE, Standard_True); prepareForPut (BP_SHORTREALSIZE); Standard_ShortReal *aData = (Standard_ShortReal*) ((char*)myData(myIndex) + myOffset); -#if DO_INVERSE +#ifdef DO_INVERSE *aData = InverseShortReal (theValue); #else *aData = theValue; @@ -366,12 +366,12 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutExtendedString alignOffset (BP_INTSIZE, Standard_True); Standard_Integer aSize = (theValue.Length() + 1) * BP_EXTCHARSIZE; prepareForPut (aSize); -#if DO_INVERSE +#ifdef DO_INVERSE Standard_Integer aStartIndex = myIndex; Standard_Integer aStartOffset = myOffset; #endif putArray ((void* )theValue.ToExtString(), aSize); -#if DO_INVERSE +#ifdef DO_INVERSE inverseExtCharData (aStartIndex, aStartOffset, aSize - BP_EXTCHARSIZE); #endif return *this; @@ -390,7 +390,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutLabel prepareForPut ((aLen + 1) * BP_INTSIZE); Standard_Integer *aData = (Standard_Integer*) ((char*)myData(myIndex) + myOffset); // store nb of tags -#if DO_INVERSE +#ifdef DO_INVERSE *aData++ = InverseInt (aLen); #else *aData++ = aLen; @@ -406,7 +406,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutLabel myIndex++; aData = (Standard_Integer*) ((char*)myData(myIndex) + myOffset); } -#if DO_INVERSE +#ifdef DO_INVERSE *aData++ = InverseInt (itTag.Value()); #else *aData++ = itTag.Value(); @@ -440,7 +440,7 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutGUID anUUID.Data4[5] = aStandardUUID.Data4[5]; anUUID.Data4[6] = aStandardUUID.Data4[6]; anUUID.Data4[7] = aStandardUUID.Data4[7]; -#if DO_INVERSE +#ifdef DO_INVERSE anUUID.Data1 = (unsigned int) InverseInt (anUUID.Data1); anUUID.Data2 = (unsigned short) InverseExtChar (anUUID.Data2); anUUID.Data3 = (unsigned short) InverseExtChar (anUUID.Data3); @@ -491,12 +491,12 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutExtCharArray alignOffset (BP_EXTCHARSIZE, Standard_True); Standard_Integer aSize = theLength * BP_EXTCHARSIZE; prepareForPut (aSize); -#if DO_INVERSE +#ifdef DO_INVERSE Standard_Integer aStartIndex = myIndex; Standard_Integer aStartOffset = myOffset; #endif putArray (theArray, aSize); -#if DO_INVERSE +#ifdef DO_INVERSE inverseExtCharData (aStartIndex, aStartOffset, aSize); #endif return *this; @@ -514,12 +514,12 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutIntArray alignOffset (BP_INTSIZE, Standard_True); Standard_Integer aSize = theLength * BP_INTSIZE; prepareForPut (aSize); -#if DO_INVERSE +#ifdef DO_INVERSE Standard_Integer aStartIndex = myIndex; Standard_Integer aStartOffset = myOffset; #endif putArray (theArray, aSize); -#if DO_INVERSE +#ifdef DO_INVERSE inverseIntData (aStartIndex, aStartOffset, aSize); #endif return *this; @@ -537,12 +537,12 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutRealArray alignOffset (BP_INTSIZE, Standard_True); Standard_Integer aSize = theLength * BP_REALSIZE; prepareForPut (aSize); -#if DO_INVERSE +#ifdef DO_INVERSE Standard_Integer aStartIndex = myIndex; Standard_Integer aStartOffset = myOffset; #endif putArray (theArray, aSize); -#if DO_INVERSE +#ifdef DO_INVERSE inverseRealData (aStartIndex, aStartOffset, aSize); #endif return *this; @@ -560,12 +560,12 @@ BinObjMgt_Persistent& BinObjMgt_Persistent::PutShortRealArray alignOffset (BP_INTSIZE, Standard_True); Standard_Integer aSize = theLength * BP_SHORTREALSIZE; prepareForPut (aSize); -#if DO_INVERSE +#ifdef DO_INVERSE Standard_Integer aStartIndex = myIndex; Standard_Integer aStartOffset = myOffset; #endif putArray (theArray, aSize); -#if DO_INVERSE +#ifdef DO_INVERSE inverseShortRealData (aStartIndex, aStartOffset, aSize); #endif return *this; @@ -615,7 +615,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetExtCharacter if (noMoreData (BP_EXTCHARSIZE)) return *this; Standard_ExtCharacter *aData = (Standard_ExtCharacter*) ((char*)myData(myIndex) + myOffset); -#if DO_INVERSE +#ifdef DO_INVERSE theValue = InverseExtChar (*aData); #else theValue = *aData; @@ -635,7 +635,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetInteger alignOffset (BP_INTSIZE); if (noMoreData (BP_INTSIZE)) return *this; Standard_Integer *aData = (Standard_Integer*) ((char*)myData(myIndex) + myOffset); -#if DO_INVERSE +#ifdef DO_INVERSE theValue = InverseInt (*aData); #else theValue = *aData; @@ -665,7 +665,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetReal theValue = *aData; ((BinObjMgt_Persistent*)this)->myOffset += BP_REALSIZE; } -#if DO_INVERSE +#ifdef DO_INVERSE theValue = InverseReal (theValue); #endif return *this; @@ -682,7 +682,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetShortReal alignOffset (BP_INTSIZE); if (noMoreData (BP_SHORTREALSIZE)) return *this; Standard_ShortReal *aData = (Standard_ShortReal*) ((char*)myData(myIndex) + myOffset); -#if DO_INVERSE +#ifdef DO_INVERSE theValue = InverseShortReal (*aData); #else theValue = *aData; @@ -784,7 +784,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetExtendedString theValue = (Standard_ExtCharacter*) aString; Standard::Free (aString); } -#if DO_INVERSE +#ifdef DO_INVERSE Standard_PExtCharacter aString = (Standard_PExtCharacter)theValue.ToExtString(); for (Standard_Integer i=0; i < theValue.Length(); i++) aString[i] = InverseExtChar (aString[i]); @@ -809,7 +809,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetLabel // retrieve nb of tags Standard_Integer *aData = (Standard_Integer*) ((char*)myData(myIndex) + myOffset); Standard_Integer aLen = *aData++; -#if DO_INVERSE +#ifdef DO_INVERSE aLen = InverseInt (aLen); #endif me->myOffset += BP_INTSIZE; @@ -824,7 +824,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetLabel me->myIndex++; aData = (Standard_Integer*) ((char*)myData(myIndex) + myOffset); } -#if DO_INVERSE +#ifdef DO_INVERSE aTagList.Append (InverseInt (*aData++)); #else aTagList.Append (*aData++); @@ -851,7 +851,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetGUID return *this; BinObjMgt_UUID anUUID; getArray (&anUUID, BP_UUIDSIZE); -#if DO_INVERSE +#ifdef DO_INVERSE anUUID.Data1 = (unsigned int) InverseInt (anUUID.Data1); anUUID.Data2 = (unsigned short) InverseExtChar (anUUID.Data2); anUUID.Data3 = (unsigned short) InverseExtChar (anUUID.Data3); @@ -912,7 +912,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetExtCharArray Standard_Integer aSize = theLength * BP_EXTCHARSIZE; if (noMoreData (aSize)) return *this; getArray (theArray, aSize); -#if DO_INVERSE +#ifdef DO_INVERSE for (Standard_Integer i=0; i < theLength; i++) theArray[i] = InverseExtChar (theArray[i]); #endif @@ -934,7 +934,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetIntArray Standard_Integer aSize = theLength * BP_INTSIZE; if (noMoreData (aSize)) return *this; getArray (theArray, aSize); -#if DO_INVERSE +#ifdef DO_INVERSE for (Standard_Integer i=0; i < theLength; i++) theArray[i] = InverseInt (theArray[i]); #endif @@ -956,7 +956,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetRealArray Standard_Integer aSize = theLength * BP_REALSIZE; if (noMoreData (aSize)) return *this; getArray (theArray, aSize); -#if DO_INVERSE +#ifdef DO_INVERSE for (Standard_Integer i=0; i < theLength; i++) theArray[i] = InverseReal (theArray[i]); #endif @@ -978,7 +978,7 @@ const BinObjMgt_Persistent& BinObjMgt_Persistent::GetShortRealArray Standard_Integer aSize = theLength * BP_SHORTREALSIZE; if (noMoreData (aSize)) return *this; getArray (theArray, aSize); -#if DO_INVERSE +#ifdef DO_INVERSE for (Standard_Integer i=0; i < theLength; i++) theArray[i] = InverseShortReal (theArray[i]); #endif diff --git a/src/BinTools/BinTools.cxx b/src/BinTools/BinTools.cxx index d17d490169..a17e8edd19 100644 --- a/src/BinTools/BinTools.cxx +++ b/src/BinTools/BinTools.cxx @@ -39,7 +39,7 @@ Standard_OStream& BinTools::PutBool(Standard_OStream& OS, const Standard_Boolean Standard_OStream& BinTools::PutInteger(Standard_OStream& OS, const Standard_Integer aValue) { Standard_Integer anIntValue = aValue; -#if DO_INVERSE +#ifdef DO_INVERSE anIntValue = InverseInt (aValue); #endif OS.write((char*)&anIntValue, sizeof(Standard_Integer)); @@ -54,7 +54,7 @@ Standard_OStream& BinTools::PutInteger(Standard_OStream& OS, const Standard_Inte Standard_OStream& BinTools::PutReal (Standard_OStream& theOS, const Standard_Real& theValue) { -#if DO_INVERSE +#ifdef DO_INVERSE const Standard_Real aRValue = InverseReal (theValue); theOS.write((char*)&aRValue, sizeof(Standard_Real)); #else @@ -70,7 +70,7 @@ Standard_OStream& BinTools::PutReal (Standard_OStream& theOS, Standard_OStream& BinTools::PutShortReal (Standard_OStream& theOS, const Standard_ShortReal& theValue) { -#if DO_INVERSE +#ifdef DO_INVERSE const Standard_ShortReal aValue = InverseShortReal (theValue); theOS.write ((char*)&aValue, sizeof(Standard_ShortReal)); #else @@ -87,7 +87,7 @@ Standard_OStream& BinTools::PutShortReal (Standard_OStream& theOS, Standard_OStream& BinTools::PutExtChar(Standard_OStream& OS, const Standard_ExtCharacter aValue) { Standard_ExtCharacter aSValue = aValue; -#if DO_INVERSE +#ifdef DO_INVERSE aSValue = InverseExtChar (aValue); #endif OS.write((char*)&aSValue, sizeof(Standard_ExtCharacter)); @@ -105,7 +105,7 @@ Standard_IStream& BinTools::GetReal (Standard_IStream& theIS, { throw Storage_StreamTypeMismatchError(); } -#if DO_INVERSE +#ifdef DO_INVERSE theValue = InverseReal (theValue); #endif return theIS; @@ -122,7 +122,7 @@ Standard_IStream& BinTools::GetShortReal (Standard_IStream& theIS, { throw Storage_StreamTypeMismatchError(); } -#if DO_INVERSE +#ifdef DO_INVERSE theValue = InverseShortReal (theValue); #endif return theIS; @@ -137,7 +137,7 @@ Standard_IStream& BinTools::GetInteger(Standard_IStream& IS, Standard_Integer& a { if(!IS.read ((char*)&aValue, sizeof(Standard_Integer))) throw Storage_StreamTypeMismatchError(); -#if DO_INVERSE +#ifdef DO_INVERSE aValue = InverseInt (aValue); #endif return IS; @@ -152,7 +152,7 @@ Standard_IStream& BinTools::GetExtChar(Standard_IStream& IS, Standard_ExtCharact { if(!IS.read ((char*)&theValue, sizeof(Standard_ExtCharacter))) throw Storage_StreamTypeMismatchError(); -#if DO_INVERSE +#ifdef DO_INVERSE theValue = InverseExtChar (theValue); #endif return IS; diff --git a/src/ChFi3d/ChFi3d_Builder_2.cxx b/src/ChFi3d/ChFi3d_Builder_2.cxx index 42e0ee03a3..5330c4d7e8 100644 --- a/src/ChFi3d/ChFi3d_Builder_2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_2.cxx @@ -1598,9 +1598,9 @@ static void ChFi3d_MakeExtremities(Handle(ChFiDS_Stripe)& Stripe, if (CV1.IsVertex()) { ChFi3d_SingularExtremity(Stripe, DStr, CV1.Vertex(), tol3d, tol2d); } -# if CHFI3D_DEB +#ifdef CHFI3D_DEB else { std::cout << "MakeExtremities : Singularity out of Vertex !!" << std::endl; } -# endif +#endif } return; } @@ -1663,9 +1663,9 @@ static void ChFi3d_MakeExtremities(Handle(ChFiDS_Stripe)& Stripe, if (cpdeb1.IsVertex()) { ChFi3d_SingularExtremity(Stripe, DStr, cpdeb1.Vertex(), tol3d, tol2d); } -# if CHFI3D_DEB +#ifdef CHFI3D_DEB else { std::cout << "MakeExtremities : Singularity out of Vertex !!" << std::endl; } -# endif +#endif } } const Handle(ChFiDS_SurfData)& @@ -1725,9 +1725,9 @@ static void ChFi3d_MakeExtremities(Handle(ChFiDS_Stripe)& Stripe, if (cpfin1.IsVertex()) { ChFi3d_SingularExtremity(Stripe, DStr, cpfin1.Vertex(), tol3d, tol2d); } -# if CHFI3D_DEB +#ifdef CHFI3D_DEB else { std::cout << "MakeExtremities : Singularity out of Vertex !!" << std::endl; } -# endif +#endif } } } diff --git a/src/ChFi3d/ChFi3d_FilBuilder.cxx b/src/ChFi3d/ChFi3d_FilBuilder.cxx index 3c4e5d0edd..db74a9b2ed 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder.cxx @@ -1755,9 +1755,9 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData, } } else { -# if CHFI3D_DEB +#ifdef CHFI3D_DEB std::cout << "Failed calculation of the minimum length" << std::endl; -# endif +#endif } } // update if non duplication diff --git a/src/ElCLib/ElCLib.cxx b/src/ElCLib/ElCLib.cxx index 5436b89a28..3097795099 100644 --- a/src/ElCLib/ElCLib.cxx +++ b/src/ElCLib/ElCLib.cxx @@ -1394,7 +1394,7 @@ Standard_Real ElCLib::HyperbolaParameter (const gp_Ax2& Pos, gp_Vec(Pos.Location (), P).Dot (gp_Vec (Pos.YDirection())) / MinorRadius; -#if __QNX__ +#if defined(__QNX__) return std::asinh(sht); #else return asinh(sht); @@ -1477,7 +1477,7 @@ Standard_Real ElCLib::HyperbolaParameter (const gp_Ax22d& Pos, { gp_Vec2d V (Pos.YDirection().XY()); Standard_Real sht = gp_Vec2d(Pos.Location(),P).Dot(V) /MinorRadius; -#if __QNX__ +#if defined(__QNX__) return std::asinh(sht); #else return asinh(sht); diff --git a/src/GeomFill/GeomFill_CircularBlendFunc.cxx b/src/GeomFill/GeomFill_CircularBlendFunc.cxx index 63b711cb9c..670a90776a 100644 --- a/src/GeomFill/GeomFill_CircularBlendFunc.cxx +++ b/src/GeomFill/GeomFill_CircularBlendFunc.cxx @@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_CircularBlendFunc,Approx_SweepFunction) -#if DRAW +#ifdef DRAW #include #include #include @@ -281,7 +281,7 @@ Standard_Boolean GeomFill_CircularBlendFunc::D0(const Standard_Real Param, myRadius, Center, Poles, Weigths); -#if DRAW +#ifdef DRAW // Handle(Geom_BSplineCurve) BS = // new Geom_BSplineCurve(Poles,Weights,Knots,Mults,Degree); // sprintf(name,"SECT_%d",NbSections++); diff --git a/src/GeomFill/GeomFill_CorrectedFrenet.cxx b/src/GeomFill/GeomFill_CorrectedFrenet.cxx index b3dbcdb33a..e650e345f0 100644 --- a/src/GeomFill/GeomFill_CorrectedFrenet.cxx +++ b/src/GeomFill/GeomFill_CorrectedFrenet.cxx @@ -389,7 +389,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const // Standard_Real StartAng = 0, AvStep, Step, t; Standard_Real StartAng = 0, AvStep, Step; -#if DRAW +#ifdef DRAW Standard_Real t; if (Affich) { // Display the curve C'^C''(t) @@ -449,7 +449,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const HArrNormal->ChangeValue(i) = SeqNormal(i); }; -#if DRAW +#ifdef DRAW if (Affich) { draw(EvolAroundT); } diff --git a/src/GeomFill/GeomFill_EvolvedSection.cxx b/src/GeomFill/GeomFill_EvolvedSection.cxx index dfbde82501..d2056596eb 100644 --- a/src/GeomFill/GeomFill_EvolvedSection.cxx +++ b/src/GeomFill/GeomFill_EvolvedSection.cxx @@ -61,7 +61,7 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C, } } -#if DRAW +#ifdef DRAW if (Affich) { char name[256]; sprintf(name,"UnifSect_%d",++NumSec); diff --git a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx index 9c168e4644..2030c32f28 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx +++ b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx @@ -41,7 +41,7 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_GuideTrihedronPlan,GeomFill_TrihedronWithGui //#include //#include -#if DRAW +#ifdef DRAW #include #endif diff --git a/src/GeomFill/GeomFill_LocationGuide.cxx b/src/GeomFill/GeomFill_LocationGuide.cxx index d364fa727c..17c2aca807 100644 --- a/src/GeomFill/GeomFill_LocationGuide.cxx +++ b/src/GeomFill/GeomFill_LocationGuide.cxx @@ -62,7 +62,7 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_LocationGuide,GeomFill_LocationLaw) -#if DRAW +#ifdef DRAW static Standard_Integer Affich = 0; #include #include @@ -195,7 +195,7 @@ static void InGoodPeriod(const Standard_Real Prec, Trans.SetIdentity(); WithTrans = Standard_False; -#if DRAW +#ifdef DRAW if (Affich) { Approx_Curve3d approx(myGuide, 1.e-4, GeomAbs_C1, diff --git a/src/GeomFill/GeomFill_UniformSection.cxx b/src/GeomFill/GeomFill_UniformSection.cxx index 6a50c1ee9b..a055716906 100644 --- a/src/GeomFill/GeomFill_UniformSection.cxx +++ b/src/GeomFill/GeomFill_UniformSection.cxx @@ -60,7 +60,7 @@ GeomFill_UniformSection::GeomFill_UniformSection(const Handle(Geom_Curve)& C, } } -#if DRAW +#ifdef DRAW if (Affich) { char name[256]; sprintf(name,"UnifSect_%d",++NumSec); diff --git a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx index 7e5a5d8786..c12c696b13 100644 --- a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx +++ b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx @@ -302,7 +302,7 @@ Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Ada Curve2d = appr.Curve2d(); } -#if DRAW +#ifdef DRAW if (Affich) { char name[256]; sprintf(name,"proj_%d",++NbProj); @@ -1652,7 +1652,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t if (! myIsLinear) { myPlanarSurfInit = mySurfInit; -#if DRAW +#ifdef DRAW if (Affich) { char name[256]; sprintf(name,"planinit_%d",NbPlan+1); @@ -1750,7 +1750,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t } } -#if DRAW +#ifdef DRAW if (Affich) { char name[256]; sprintf(name,"surfinit_%d",++NbPlan); @@ -2447,7 +2447,7 @@ VerifSurface(const Standard_Integer NbBoucle) diffDistMax = diffDist; SdiffDist+=diffDist; NdiffDist++; -#if DRAW +#ifdef DRAW if ((Affich) && (NbBoucle == myNbIter)) { gp_Pnt P; gp_Pnt2d P2d; @@ -2479,7 +2479,7 @@ VerifSurface(const Standard_Integer NbBoucle) diffAngMax = diffAng; SdiffAng+=diffAng; NdiffAng++; -#if DRAW +#ifdef DRAW if ((Affich) && (NbBoucle == myNbIter)) { gp_Pnt P; LinCont->D0(U,P); diff --git a/src/IntPatch/IntPatch_Intersection.cxx b/src/IntPatch/IntPatch_Intersection.cxx index 89df1f0e5d..1ef65fe6a4 100644 --- a/src/IntPatch/IntPatch_Intersection.cxx +++ b/src/IntPatch/IntPatch_Intersection.cxx @@ -1576,14 +1576,14 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& S1, myTolArc = TolArc; myTolTang = TolTang; if(myFleche == 0.0) { -#if DEBUG +#ifdef OCCT_DEBUG //std::cout<<" -- IntPatch_Intersection::myFleche fixe par defaut a 0.01 --"< 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) + #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) // gcc emits -Warray-bounds warning when NCollection_Array1 is initialized // from local array with lower index 1 (so that (&theBegin - 1) points out of array bounds). // NCollection_Array1 initializes myData with a shift to avoid this shift within per-element access. @@ -220,7 +220,7 @@ public: #pragma GCC diagnostic ignored "-Warray-bounds" #endif myData = (TheItemType *) &theBegin - theLower; - #if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) + #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif } diff --git a/src/Standard/Standard_JmpBuf.hxx b/src/Standard/Standard_JmpBuf.hxx index 2bf5c0c561..f7d22cc924 100644 --- a/src/Standard/Standard_JmpBuf.hxx +++ b/src/Standard/Standard_JmpBuf.hxx @@ -20,7 +20,7 @@ typedef #ifdef SOLARIS sigjmp_buf -#elif IRIX +#elif defined(IRIX) sigjmp_buf #else jmp_buf diff --git a/src/Standard/Standard_Macro.hxx b/src/Standard/Standard_Macro.hxx index c9bcda0810..86cd3bad9c 100644 --- a/src/Standard/Standard_Macro.hxx +++ b/src/Standard/Standard_Macro.hxx @@ -158,7 +158,7 @@ #if defined(__ICL) || defined (__INTEL_COMPILER) #define Standard_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:1478)) #define Standard_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop)) -#elif (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__) +#elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) || defined(__clang__) // available since at least gcc 4.2 (maybe earlier), however only gcc 4.6+ supports this pragma inside the function body // CLang also supports this gcc syntax (in addition to "clang diagnostic ignored") #define Standard_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") diff --git a/src/Standard/Standard_OutOfRange.hxx b/src/Standard/Standard_OutOfRange.hxx index 25b07d6cba..2b81dedd9a 100644 --- a/src/Standard/Standard_OutOfRange.hxx +++ b/src/Standard/Standard_OutOfRange.hxx @@ -25,7 +25,7 @@ class Standard_OutOfRange; DEFINE_STANDARD_HANDLE(Standard_OutOfRange, Standard_RangeError) -#if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) // suppress false-positive warnings produced by GCC optimizer #define Standard_OutOfRange_Always_Raise_if(CONDITION, MESSAGE) \ _Pragma("GCC diagnostic push") \ diff --git a/src/Standard/Standard_RangeError.hxx b/src/Standard/Standard_RangeError.hxx index 719924ca6f..2f10deeafb 100644 --- a/src/Standard/Standard_RangeError.hxx +++ b/src/Standard/Standard_RangeError.hxx @@ -26,7 +26,7 @@ class Standard_RangeError; DEFINE_STANDARD_HANDLE(Standard_RangeError, Standard_DomainError) #if !defined No_Exception && !defined No_Standard_RangeError -#if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) // suppress false-positive warnings produced by GCC optimizer #define Standard_RangeError_Raise_if(CONDITION, MESSAGE) \ _Pragma("GCC diagnostic push") \ diff --git a/src/Standard/Standard_Real.cxx b/src/Standard/Standard_Real.cxx index 6139c5e2fe..8bf29fb5e5 100644 --- a/src/Standard/Standard_Real.cxx +++ b/src/Standard/Standard_Real.cxx @@ -258,7 +258,7 @@ Standard_Real ATanh(const Standard_Real Value) #endif throw Standard_NumericError("Illegal argument in ATanh"); } -#if __QNX__ +#if defined(__QNX__) return std::atanh(Value); #else return atanh(Value); @@ -276,7 +276,7 @@ Standard_Real ACosh (const Standard_Real Value) #endif throw Standard_NumericError("Illegal argument in ACosh"); } -#if __QNX__ +#if defined(__QNX__) return std::acosh(Value); #else return acosh(Value); diff --git a/src/Standard/Standard_Real.hxx b/src/Standard/Standard_Real.hxx index 9c9d193f3c..767c9c18e3 100644 --- a/src/Standard/Standard_Real.hxx +++ b/src/Standard/Standard_Real.hxx @@ -294,7 +294,7 @@ inline Standard_Real Sin (const Standard_Real Value) // ASinh : Returns the hyperbolic arc sine of a real //------------------------------------------------------------------- inline Standard_Real ASinh(const Standard_Real Value) -#if __QNX__ +#if defined(__QNX__) { return std::asinh(Value); } #else { return asinh(Value); } diff --git a/src/math/math_Recipes.cxx b/src/math/math_Recipes.cxx index 165d20fe9f..a0f2b633b4 100644 --- a/src/math/math_Recipes.cxx +++ b/src/math/math_Recipes.cxx @@ -12,15 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// This preprocessor directive is a kludge to get around -// a bug in the Sun Workshop 5.0 compiler, it keeps the -// /usr/include/memory.h file from being #included -// with an incompatible extern "C" definition of memchr -// October 18, 2000 -#if __SUNPRO_CC == 0x500 -#define _MEMORY_H -#endif - //#ifndef OCCT_DEBUG #define No_Standard_RangeError #define No_Standard_OutOfRange