From e8cdc2d15d9ca8f51a72cb27c3445d678d87717c Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <Ansgar.Burchardt@tu-dresden.de>
Date: Mon, 29 Oct 2018 13:48:50 +0100
Subject: [PATCH] move `COMPARE_RECORD` into UGDIM namespace
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This silences a compiler warning from GCC when building programs with
LTO where GCC sees two definitions of `COMPARE_RECORD` (for 2d and for
3d):

```
../gm/refine.cc:3450:8: warning: type ‘struct compare_record’ violates the C++ One Definition Rule [-Wodr]
../gm/refine.cc:3450:8: note: a different type is defined in another translation unit
../gm/refine.cc:3453:12: note: the first difference of corresponding definitions is field ‘elem’
../gm/refine.cc:3453:12: note: a field of same name but different type is defined in another translation unit
../ug/gm.h:1644:24: note: type ‘union ELEMENT’ should match type ‘union ELEMENT’
```
---
 gm/refine.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gm/refine.cc b/gm/refine.cc
index c8e5affb8..735d79384 100644
--- a/gm/refine.cc
+++ b/gm/refine.cc
@@ -3445,7 +3445,7 @@ static INT UnrefineElement (GRID *theGrid, ELEMENT *theElement)
 }
 
 
-
+START_UGDIM_NAMESPACE
 
 struct compare_record
 {
@@ -3463,6 +3463,7 @@ struct compare_record
 };
 typedef struct compare_record COMPARE_RECORD;
 
+END_UGDIM_NAMESPACE
 
 INT NS_DIM_PREFIX GetSonSideNodes (const ELEMENT *theElement, INT side, INT *nodes,
                                    NODE *SideNodes[MAX_SIDE_NODES], INT ioflag)
-- 
GitLab