From d2cde359e377e4b05fe1468a521c6c5bba77416e Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 24 Oct 2013 15:14:34 +0000 Subject: [PATCH] Win32 compilation. --- src/BLSURFPlugin/BLSURFPlugin_Attractor.hxx | 2 +- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 10 ++++----- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx | 4 ++-- .../BLSURFPlugin_Hypothesis_i.cxx | 4 ++-- src/GUI/BLSURFPluginGUI.cxx | 2 +- src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 22 +++++++++---------- src/GUI/BLSURFPluginGUI_HypothesisCreator.h | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/BLSURFPlugin/BLSURFPlugin_Attractor.hxx b/src/BLSURFPlugin/BLSURFPlugin_Attractor.hxx index 2caf2b3..c326845 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Attractor.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Attractor.hxx @@ -69,7 +69,7 @@ #include #include -#ifndef WNT +#ifndef WIN32 #include #endif diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 8cdd6ee..a8abc9b 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -91,7 +91,7 @@ extern "C"{ #include #include -#ifndef WNT +#ifndef WIN32 #include #endif @@ -853,7 +853,7 @@ void BLSURFPlugin_BLSURF::createEdgesPeriodicity(TopoDS_Shape theGeomShape, BLSU TListOfIDs theEdge1_ids = _getSubShapeIDsInMainShape(theGeomShape, GeomEdge1, TopAbs_EDGE); TListOfIDs theEdge2_ids = _getSubShapeIDsInMainShape(theGeomShape, GeomEdge2, TopAbs_EDGE); - if (edge_orientation == 0 and GeomEdge1.Closed()) + if (edge_orientation == 0 && GeomEdge1.Closed()) { // if edge is closed, we have to set its orientation MESSAGE("GeomEdge1.Orientation() = " << GeomEdge1.Orientation()); @@ -1444,7 +1444,7 @@ void BLSURFPlugin_BLSURF::SetParameters( } MESSAGE("_preCadEdgesIDsPeriodicityVector.size() = " << _preCadEdgesIDsPeriodicityVector.size()); - if ( _preCadFacesIDsPeriodicityVector.size() > 0 or _preCadEdgesIDsPeriodicityVector.size() > 0 ) + if ( _preCadFacesIDsPeriodicityVector.size() > 0 || _preCadEdgesIDsPeriodicityVector.size() > 0 ) { MESSAGE("USING PRECAD FOR PERIODICITY") *use_precad = true; @@ -1948,7 +1948,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, TopTools_IndexedMapOfShape pmap; // Issue 0019864. On DebianSarge, FE signals do not obey to OSD::SetSignal(false) -#ifndef WNT +#ifndef WIN32 feclearexcept( FE_ALL_EXCEPT ); int oldFEFlags = fedisableexcept( FE_ALL_EXCEPT ); #endif @@ -3075,7 +3075,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, } // Issue 0019864. On DebianSarge, FE signals do not obey to OSD::SetSignal(false) -#ifndef WNT +#ifndef WIN32 if ( oldFEFlags > 0 ) feenableexcept( oldFEFlags ); feclearexcept( FE_ALL_EXCEPT ); diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index a142f94..444429e 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -1512,7 +1512,7 @@ void BLSURFPlugin_Hypothesis::SaveEdgesPeriodicity(std::ostream & save){ for (; it_edges_periodicity != _edgesPeriodicityVector.end(); ++it_edges_periodicity) { TEdgePeriodicity periodicity_i = (*it_edges_periodicity); save << " " << "__BEGIN_PERIODICITY_DESCRIPTION__"; - if (not periodicity_i.theFace1Entry.empty()){ + if (! periodicity_i.theFace1Entry.empty()){ save << " " << "__BEGIN_FACE1__"; save << " " << periodicity_i.theFace1Entry; save << " " << "__END_FACE1__"; @@ -1520,7 +1520,7 @@ void BLSURFPlugin_Hypothesis::SaveEdgesPeriodicity(std::ostream & save){ save << " " << "__BEGIN_EDGE1__"; save << " " << periodicity_i.theEdge1Entry; save << " " << "__END_EDGE1__"; - if (not periodicity_i.theFace2Entry.empty()){ + if (! periodicity_i.theFace2Entry.empty()){ save << " " << "__BEGIN_FACE2__"; save << " " << periodicity_i.theFace2Entry; save << " " << "__END_FACE2__"; diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx index ffb5b15..e3c0d79 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx @@ -2739,7 +2739,7 @@ BLSURFPlugin::TPeriodicityList* BLSURFPlugin_Hypothesis_i::PreCadVectorToSequenc myPreCadPeriodicity->shape2Entry = CORBA::string_dup(preCadPeriodicityVector_i.shape2Entry.c_str()); BLSURFPlugin::TEntryList_var sourceVertices = new BLSURFPlugin::TEntryList(); - if (not preCadPeriodicityVector_i.theSourceVerticesEntries.empty()) + if (! preCadPeriodicityVector_i.theSourceVerticesEntries.empty()) { sourceVertices->length(preCadPeriodicityVector_i.theSourceVerticesEntries.size()); for (size_t j=0; jtheSourceVerticesEntries = sourceVertices; BLSURFPlugin::TEntryList_var targetVertices = new BLSURFPlugin::TEntryList(); - if (not preCadPeriodicityVector_i.theTargetVerticesEntries.empty()) + if (! preCadPeriodicityVector_i.theTargetVerticesEntries.empty()) { targetVertices->length(preCadPeriodicityVector_i.theTargetVerticesEntries.size()); for (size_t j=0; j(editor); QString value = lineEdit->text(); - if (! vertexExists(model, index, value)) + if (!vertexExists(model, index, value)) model->setData(index, value, Qt::EditRole); } else if (index.column() == ENF_VER_GROUP_COLUMN) { QLineEdit *lineEdit = static_cast(editor); @@ -1569,7 +1569,7 @@ void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() { int selSource = myPeriodicitySourceFaceWdg->NbObjects(); int selTarget = myPeriodicityTargetFaceWdg->NbObjects(); - if (selSource == 0 or selTarget == 0) + if (selSource == 0 || selTarget == 0) return; // Vertices selection @@ -1582,7 +1582,7 @@ void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() { int P2Tsel = myPeriodicityP2TargetWdg->NbObjects(); int P3Tsel = myPeriodicityP3TargetWdg->NbObjects(); - if (P1Ssel!=1 or P2Ssel!=1 or P3Ssel!=1 or P1Tsel!=1 or P3Tsel!=1 or P3Tsel!=1) + if (P1Ssel!=1 || P2Ssel!=1 || P3Ssel!=1 || P1Tsel!=1 || P3Tsel!=1 || P3Tsel!=1) { QString msg = tr("BLSURF_PERIODICITY_WRONG_NUMBER_OF_VERTICES"); SUIT_MessageBox::critical( dlg(),"Error" , msg ); @@ -1610,7 +1610,7 @@ void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() { shapeEntry = shape->GetStudyEntry(); item->setData(k, Qt::EditRole, shapeName.c_str() ); item->setData(k, Qt::UserRole, shapeEntry.c_str() ); - if (not myPeriodicityGroupBox2->isChecked() and k==1) + if (! myPeriodicityGroupBox2->isChecked() && k==1) break; } @@ -1651,7 +1651,7 @@ This method enable clears the field for periodicity by vertices */ void BLSURFPluginGUI_HypothesisCreator::onPeriodicityByVerticesChecked(bool checked) { - if (not checked) + if (! checked) { for (size_t k=2; kdata(k, Qt::EditRole).toString(); shapeEntry = item->data(k, Qt::UserRole).toString(); - if (not shapeEntry.isEmpty()) + if (! shapeEntry.isEmpty()) { shape = entryToObject(shapeEntry); w1->SetObject(shape); @@ -1730,10 +1730,10 @@ void BLSURFPluginGUI_HypothesisCreator::onPeriodicityContentModified() for (; anIt != myPeriodicitySelectionWidgets.end(); anIt++, k++) { StdMeshersGUI_ObjectReferenceParamWdg * w1 = ( StdMeshersGUI_ObjectReferenceParamWdg* ) ( *anIt ); - if (w1->IsSelectionActivated() and k<(myPeriodicitySelectionWidgets.size()-1)) + if (w1->IsSelectionActivated() && k<(myPeriodicitySelectionWidgets.size()-1)) { // don't activate vertex selection if the group box is not checked - if (k==1 and not myPeriodicityGroupBox2->isChecked()) + if (k==1 && !myPeriodicityGroupBox2->isChecked()) break; // clear the selection, to avoid to put the same object in the other widget that->getGeomSelectionTool()->selectionMgr()->clearSelected(); @@ -2394,7 +2394,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi h->SetInternalEnforcedVertexAllFacesGroup( h_data.myInternalEnforcedVerticesAllFacesGroup.c_str() ); // Periodicity - if ( h->GetPreCadFacesPeriodicityVector()->length() > 0 or h->GetPreCadEdgesPeriodicityVector()->length() > 0 ) + if ( h->GetPreCadFacesPeriodicityVector()->length() > 0 || h->GetPreCadEdgesPeriodicityVector()->length() > 0 ) h->ClearPreCadPeriodicityVectors(); MESSAGE("h_data.preCadPeriodicityVector.size(): " << h_data.preCadPeriodicityVector.size()); @@ -2413,7 +2413,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi bool onFace = (periodicity_i[PERIODICITY_SHAPE_TYPE]=="1") ? true : false; BLSURFPlugin::TEntryList_var sourceVertices = new BLSURFPlugin::TEntryList(); - if (not p1Source.empty()) + if (! p1Source.empty()) { sourceVertices->length(3); sourceVertices[0]=CORBA::string_dup(p1Source.c_str()); @@ -2423,7 +2423,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi BLSURFPlugin::TEntryList_var targetVertices = new BLSURFPlugin::TEntryList(); - if (not p1Target.empty()) + if (! p1Target.empty()) { targetVertices->length(3); targetVertices[0]=CORBA::string_dup(p1Target.c_str()); diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h index 6c6a407..743d0b5 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h @@ -46,7 +46,7 @@ #define BLSURFPLUGIN_GUI_EXPORT #endif -#ifdef WNT +#ifdef WIN32 // E.A. : On windows with python 2.6, there is a conflict // E.A. : between pymath.h and Standard_math.h which define // E.A. : some same symbols : acosh, asinh, ... -- 2.39.2