Skip to content
Snippets Groups Projects
Commit afd43167 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix compile with old C++ compilers

parent 0dc4a47d
Branches
Tags
No related merge requests found
...@@ -15,7 +15,6 @@ class GFace; ...@@ -15,7 +15,6 @@ class GFace;
class MVertex; class MVertex;
class MElement; class MElement;
extern "C" extern "C"
{ {
GMSH_Plugin *GMSH_RegisterFaultZonePlugin(); GMSH_Plugin *GMSH_RegisterFaultZonePlugin();
...@@ -81,7 +80,7 @@ class GMSH_FaultZoneMesher{ ...@@ -81,7 +80,7 @@ class GMSH_FaultZoneMesher{
inline bool compareHeav(const std::vector< int > heav1, const std::vector< int > heav2){ inline bool compareHeav(const std::vector< int > heav1, const std::vector< int > heav2){
assert(heav1.size() >= heav2.size()); assert(heav1.size() >= heav2.size());
for (unsigned int i=0; i< heav2.size(); i++){ for (unsigned int i=0; i< heav2.size(); i++){
if (heav1[i] != 0 and heav1[i] != heav2[i] and heav2[i] != 0){ if (heav1[i] != 0 && heav1[i] != heav2[i] && heav2[i] != 0){
return false; return false;
} }
} }
...@@ -93,11 +92,13 @@ inline bool compareHeav(const std::vector< int > heav1, const std::vector< int > ...@@ -93,11 +92,13 @@ inline bool compareHeav(const std::vector< int > heav1, const std::vector< int >
* \brief Find the matching heaviside function heav, in the vector heavFunc * \brief Find the matching heaviside function heav, in the vector heavFunc
*/ */
//============================================================================= //=============================================================================
inline int findMatchingHeav(const std::vector< std::vector < int > >& heavFunc, const std::vector< int >& heav){ inline int findMatchingHeav(const std::vector< std::vector < int > >& heavFunc,
const std::vector< int >& heav){
unsigned int i=0; unsigned int i=0;
for (; i < heavFunc.size();i++) for (; i < heavFunc.size();i++)
if(compareHeav(heavFunc[i], heav)) break; if(compareHeav(heavFunc[i], heav)) break;
assert(i<heavFunc.size()); assert(i<heavFunc.size());
return i; return i;
} }
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment