Skip to content
  • Ansgar Burchardt's avatar
    UGGrid: `Corner_Coordinates`: return number of corners · 794aef04
    Ansgar Burchardt authored
    The geometry implementation used an extra call to the `corners()`
    method to get the number of corners before.  As the compiler could not
    be sure this is the same number as `Corner_Coordinates()` uses, there
    were several compiler warnings (from gcc 7.2) of the form
    
    ```
    dune-uggrid/gm/evm.h: In member function ‘[...] Dune::UGGridGeometry<[...]>::volume() const [...]’:
    dune-uggrid/gm/evm.h:88:67: warning: ‘*((void*)& cornerCoords +24)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    dune-grid/dune/grid/uggrid/uggridgeometry.hh:96:16: note: ‘*((void*)& cornerCoords +24)’ was declared here
    ```
    
    With this change the wrapper function returns the number of corners
    just as the dune-uggrid macro does.  Using this value instead of the
    `corners()` call silences the compiler warnings.
    794aef04