From a4d61a7b6f94b6f1c8cf00fb6b966232d834f7fc Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 31 Jul 2009 13:52:22 +0000 Subject: [PATCH] Fix compilation problems on Windows --- src/MEFISTO2/aptrte.cxx | 12 ++++++++++-- src/SMESH/SMESH_MesherHelper.cxx | 10 +++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/MEFISTO2/aptrte.cxx b/src/MEFISTO2/aptrte.cxx index b2559e323..f1579fa3a 100755 --- a/src/MEFISTO2/aptrte.cxx +++ b/src/MEFISTO2/aptrte.cxx @@ -50,7 +50,11 @@ extern "C" static double cpunew, cpuold=0; -void tempscpu_( double & tempsec ) +void +#ifdef WIN32 + __stdcall +#endif +tempscpu_( double & tempsec ) //Retourne le temps CPU utilise en secondes { tempsec = ( (double) clock() ) / CLOCKS_PER_SEC; @@ -58,7 +62,11 @@ void tempscpu_( double & tempsec ) } -void deltacpu_( R & dtcpu ) +void +#ifdef WIN32 + __stdcall +#endif +deltacpu_( R & dtcpu ) //Retourne le temps CPU utilise en secondes depuis le precedent appel { tempscpu_( cpunew ); diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index eb138d2ed..8b2062deb 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -1406,7 +1406,7 @@ namespace { // Structures used by FixQuadraticElements() bool IsBoundary() const { return !_qfaces[1]; } void RemoveFace( const QFace* face ) const - { _qfaces[(face == _qfaces[1])] = 0; if (!_qfaces[0]) swap(_qfaces[0],_qfaces[1]); } + { _qfaces[(face == _qfaces[1])] = 0; if (!_qfaces[0]) std::swap(_qfaces[0],_qfaces[1]); } const QFace* NextFace( const QFace* f ) const { return _qfaces[0]==f ? _qfaces[1] : _qfaces[0]; } @@ -1425,7 +1425,7 @@ namespace { // Structures used by FixQuadraticElements() // -------------------------------------------------------------------- typedef list< TChainLink > TChain; typedef set < TChainLink > TLinkSet; - typedef TLinkSet::iterator TLinkInSet; + typedef TLinkSet::const_iterator TLinkInSet; const int theFirstStep = 5; @@ -1513,7 +1513,7 @@ namespace { // Structures used by FixQuadraticElements() ostream& operator << (ostream& out, const QFace& f) { out <<"QFace nodes: "/*<< &f << " "*/; - for ( TIDSortedElemSet::iterator n = f.begin(); n != f.end(); ++n ) + for ( TIDSortedElemSet::const_iterator n = f.begin(); n != f.end(); ++n ) out << (*n)->GetID() << " "; out << " \tvolumes: " << (f._volumes[0] ? f._volumes[0]->GetID() : 0) << " " @@ -1860,7 +1860,7 @@ namespace { // Structures used by FixQuadraticElements() if ( iFaceCont > 0 ) // continues faces found, set one by the other { if ( iFaceCont != 1 ) - swap( _faces[1], _faces[iFaceCont] ); + std::swap( _faces[1], _faces[iFaceCont] ); } else if ( _faces.size() > 1 ) // not found, set NULL by the first face { @@ -1955,7 +1955,7 @@ namespace { // Structures used by FixQuadraticElements() } } curBndLinks->clear(); - swap( curBndLinks, newBndLinks ); + std::swap( curBndLinks, newBndLinks ); } } -- 2.39.2