Skip to content

Make GeoFacet a protected detail of GeoPolyhedron

Compiling GeoModel with LTO enabled identified a One Definition Rule warning:

[100%] Linking CXX shared library libGeoModelKernel.so
.../GeoModel.git/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoFacet.h:24:7:
warning: type 'struct GeoFacet' violates the C++ One Definition Rule
[-Wodr]
   24 | class GeoFacet : public RCBase
      |       ^
.../GeoModel.git/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoPolyhedron.h:168:7:
note: a type with different bases is defined in another translation unit
  168 | class GeoFacet
      |       ^
[100%] Built target GeoModelKernel

Following discussion in #77 (closed), resolve this by making GeoFacet in GeoPolyhedron.h a protected implementation detail of GeoPolyhedron. Update friendship operators and use elsewhere for nesting.

Fixes: #77 (closed)

Merge request reports