Skip to content

Reduce the number of undef statements in the ug_undefs.hh

Simon Praetorius requested to merge issue/cleanup-ug-undefs into master

Summary

The ug_undefs.hh file was created to `#undef' macros introduced in the uggrid library to reduce incompatibilities with other dune grid implementations. This file is cleaned up automatically, by only including those undefs of macros that actually are used anywhere in the dune-uggrid code.

This cleanup is done using the attached python script. cleanupUndefs.py

The number of macros is reduced from 1633 to 1162

Remarks

It is required to include the ugincludes.hh file multiple times with different macros defined. This allows to have 2d and 3d code in one library. But, this requires to undefine the include-guard if this file. Previously this was done inside the ug_undefs.hh what makes it complicated to automatically cleanup this file. Thus, this #undef is moved to the place where the ugincludes.hh file is actually included.

Closes #120 (closed)

Edited by Simon Praetorius

Merge request reports

Loading