Fix compilation problems on Windows

This commit is contained in:
vsr 2009-07-31 13:52:22 +00:00
parent ce336312be
commit a4d61a7b6f
2 changed files with 15 additions and 7 deletions

View File

@ -50,7 +50,11 @@ extern "C"
static double cpunew, cpuold=0; static double cpunew, cpuold=0;
void tempscpu_( double & tempsec ) void
#ifdef WIN32
__stdcall
#endif
tempscpu_( double & tempsec )
//Retourne le temps CPU utilise en secondes //Retourne le temps CPU utilise en secondes
{ {
tempsec = ( (double) clock() ) / CLOCKS_PER_SEC; 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 //Retourne le temps CPU utilise en secondes depuis le precedent appel
{ {
tempscpu_( cpunew ); tempscpu_( cpunew );

View File

@ -1406,7 +1406,7 @@ namespace { // Structures used by FixQuadraticElements()
bool IsBoundary() const { return !_qfaces[1]; } bool IsBoundary() const { return !_qfaces[1]; }
void RemoveFace( const QFace* face ) const 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 const QFace* NextFace( const QFace* f ) const
{ return _qfaces[0]==f ? _qfaces[1] : _qfaces[0]; } { return _qfaces[0]==f ? _qfaces[1] : _qfaces[0]; }
@ -1425,7 +1425,7 @@ namespace { // Structures used by FixQuadraticElements()
// -------------------------------------------------------------------- // --------------------------------------------------------------------
typedef list< TChainLink > TChain; typedef list< TChainLink > TChain;
typedef set < TChainLink > TLinkSet; typedef set < TChainLink > TLinkSet;
typedef TLinkSet::iterator TLinkInSet; typedef TLinkSet::const_iterator TLinkInSet;
const int theFirstStep = 5; const int theFirstStep = 5;
@ -1513,7 +1513,7 @@ namespace { // Structures used by FixQuadraticElements()
ostream& operator << (ostream& out, const QFace& f) ostream& operator << (ostream& out, const QFace& f)
{ {
out <<"QFace nodes: "/*<< &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 << (*n)->GetID() << " ";
out << " \tvolumes: " out << " \tvolumes: "
<< (f._volumes[0] ? f._volumes[0]->GetID() : 0) << " " << (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 > 0 ) // continues faces found, set one by the other
{ {
if ( iFaceCont != 1 ) 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 else if ( _faces.size() > 1 ) // not found, set NULL by the first face
{ {
@ -1955,7 +1955,7 @@ namespace { // Structures used by FixQuadraticElements()
} }
} }
curBndLinks->clear(); curBndLinks->clear();
swap( curBndLinks, newBndLinks ); std::swap( curBndLinks, newBndLinks );
} }
} }