Skip to content
Snippets Groups Projects
Commit 27dcc41d authored by Oliver Sander's avatar Oliver Sander
Browse files

[!142] change const to constexpr for constant values used as template parameters

Merge branch 'issue/intel_const_constexpr' into 'master'

ref:core/dune-geometry\>

### Summary

Solve an intel-compiler related error, by replacing const by constexpr for
template parameter variables.

See merge request [!142]

  [!142]: gitlab.dune-project.org/core/dune-geometry/merge_requests/142
parents b1eb3c1c 48a67b51
No related branches found
No related tags found
1 merge request!142change const to constexpr for constant values used as template parameters
Pipeline #26516 passed
......@@ -522,8 +522,8 @@ namespace Dune
topologyId &= ~1;
coerceToId &= ~1;
const unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
const unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
switch( topologyId )
{
......@@ -573,7 +573,7 @@ namespace Dune
topologyId &= ~1;
coerceToId &= ~1;
const unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
if (topologyId == 0 && coerceToId == 0)
return VirtualRefinementImp< idSimplex, CoordType, idSimplex, dimension>::instance();
......@@ -595,10 +595,10 @@ namespace Dune
topologyId &= ~1;
coerceToId &= ~1;
const unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
const unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
const unsigned idPrism = GeometryTypes::prism.id() & ~1;
const unsigned idPyramid = GeometryTypes::pyramid.id() & ~1;
constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
constexpr unsigned idPrism = GeometryTypes::prism.id() & ~1;
constexpr unsigned idPyramid = GeometryTypes::pyramid.id() & ~1;
switch( topologyId )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment