From: vsr Date: Fri, 31 Jul 2009 13:52:22 +0000 (+0000) Subject: Fix compilation problems on Windows X-Git-Tag: V5_1_3rc1~126 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=a4d61a7b6f94b6f1c8cf00fb6b966232d834f7fc Fix compilation problems on Windows --- 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 ); } }