From f37aadd3c71780bec5dc4945c1229dd16389b054 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 26 Aug 2011 12:35:08 +0000 Subject: [PATCH] pp --- Common/ListUtils.cpp | 48 +++++++++++++++++++++----------------------- Mesh/meshGFace.cpp | 2 +- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/Common/ListUtils.cpp b/Common/ListUtils.cpp index 88c293ae6d..9c0ea5aac3 100644 --- a/Common/ListUtils.cpp +++ b/Common/ListUtils.cpp @@ -18,6 +18,29 @@ #include "TreeUtils.h" #include "GmshMessage.h" +int fcmp_int(const void *a, const void *b) +{ + return (*(int *)a - *(int *)b); +} + +int fcmp_absint(const void *a, const void *b) +{ + return (abs(*(int *)a) - abs(*(int *)b)); +} + +int fcmp_double(const void *a, const void *b) +{ + double cmp; + + cmp = *(double *)a - *(double *)b; + if(cmp > 1.e-16) + return 1; + else if(cmp < -1.e-16) + return -1; + else + return 0; +} + List_T *List_Create(int n, int incr, int size) { List_T *liste; @@ -271,28 +294,3 @@ List_T *ListOfDouble2ListOfInt(List_T *dList) return iList; } -// Comparison functions - -int fcmp_int(const void *a, const void *b) -{ - return (*(int *)a - *(int *)b); -} - -int fcmp_absint(const void *a, const void *b) -{ - return (abs(*(int *)a) - abs(*(int *)b)); -} - -int fcmp_double(const void *a, const void *b) -{ - double cmp; - - cmp = *(double *)a - *(double *)b; - if(cmp > 1.e-16) - return 1; - else if(cmp < -1.e-16) - return -1; - else - return 0; -} - diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp index f022f3e972..a49803fc0c 100644 --- a/Mesh/meshGFace.cpp +++ b/Mesh/meshGFace.cpp @@ -409,7 +409,7 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER, // if necessary split compound and remesh parts bool isMeshed = false; if(gf->geomType() == GEntity::CompoundSurface && !onlyInitialMesh){ - isMeshed = checkMeshCompound((GFaceCompound*) gf, edges); + isMeshed = checkMeshCompound((GFaceCompound*) gf, edges); if (isMeshed) return true; } -- GitLab