diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H index 6ebf8ca347..e5904be854 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H @@ -579,8 +579,8 @@ inline bool CGAL::indexedCell::potentialCoplanarCell() const if (nMasters == 2 && nSlaves == 2) { - Foam::vector vp0(Foam::Zero); - Foam::vector vp1(Foam::Zero); + Foam::vector vp0(Foam::zero{}); + Foam::vector vp1(Foam::zero{}); if ( diff --git a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.C b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.C index cf45130667..0684c31d18 100644 --- a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.C +++ b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.C @@ -81,7 +81,7 @@ Foam::CompactListList Foam::CompactListList::pack_impl if (len) { - newOffsets.resize(len+1, Zero); + newOffsets.resize(len+1, Foam::zero{}); for (label i = 0; i < len; ++i) { diff --git a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListListI.H b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListListI.H index 5e5209fcb9..e5c76d8c85 100644 --- a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListListI.H +++ b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListListI.H @@ -89,7 +89,7 @@ inline Foam::CompactListList::CompactListList const label nVals ) : - offsets_(mRows+1, Zero), + offsets_(mRows+1, Foam::zero{}), values_(nVals) { // Optionally: enforceSizeSanity(); @@ -104,8 +104,8 @@ inline Foam::CompactListList::CompactListList const Foam::zero ) : - offsets_(mRows+1, Zero), - values_(nVals, Zero) + offsets_(mRows+1, Foam::zero{}), + values_(nVals, Foam::zero{}) { // Optionally: enforceSizeSanity(); } @@ -119,7 +119,7 @@ inline Foam::CompactListList::CompactListList const T& val ) : - offsets_(mRows+1, Zero), + offsets_(mRows+1, Foam::zero{}), values_(nVals, val) { // Optionally: enforceSizeSanity(); @@ -378,7 +378,7 @@ inline void Foam::CompactListList::resize } else { - offsets_.resize(mRows+1, Zero); + offsets_.resize(mRows+1, Foam::zero{}); values_.resize(nVals); } } @@ -399,7 +399,7 @@ inline void Foam::CompactListList::resize_nocopy } else { - offsets_.resize(mRows+1, Zero); + offsets_.resize(mRows+1, Foam::zero{}); values_.resize_nocopy(nVals); } } @@ -421,7 +421,7 @@ inline void Foam::CompactListList::resize } else { - offsets_.resize(mRows+1, Zero); + offsets_.resize(mRows+1, Foam::zero{}); values_.resize(nVals, val); } } diff --git a/src/OpenFOAM/expressions/fields/fieldExprLemonParser.lyy-m4 b/src/OpenFOAM/expressions/fields/fieldExprLemonParser.lyy-m4 index ce845dda4a..678afef0c9 100644 --- a/src/OpenFOAM/expressions/fields/fieldExprLemonParser.lyy-m4 +++ b/src/OpenFOAM/expressions/fields/fieldExprLemonParser.lyy-m4 @@ -7,7 +7,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019-2021 OpenCFD Ltd. + Copyright (C) 2019-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -163,7 +163,7 @@ operator_precedence() svalue (lhs) ::= NUMBER (tok) . { lhs = (tok).scalarValue; } // scanToken -svalue (lhs) ::= ZERO . { lhs = Foam::Zero; } +svalue (lhs) ::= ZERO . { lhs = Foam::zero{}; } svalue (lhs) ::= PI LPAREN RPAREN . { lhs = Foam::constant::mathematical::pi; } svalue (lhs) ::= DEG_TO_RAD LPAREN RPAREN . { lhs = Foam::degToRad(); } svalue (lhs) ::= RAD_TO_DEG LPAREN RPAREN . { lhs = Foam::radToDeg(); } diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.H b/src/OpenFOAM/meshes/meshShapes/face/face.H index b103c0256e..7d9a1bd170 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.H +++ b/src/OpenFOAM/meshes/meshShapes/face/face.H @@ -395,7 +395,7 @@ public: // Face splitting utilities //- Number of triangles after splitting - inline label nTriangles() const; + inline label nTriangles() const noexcept; //- Number of triangles after splitting label nTriangles(const UList& unused) const; diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceI.H b/src/OpenFOAM/meshes/meshShapes/face/faceI.H index 320b05e6c7..36c535a9ce 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/faceI.H +++ b/src/OpenFOAM/meshes/meshShapes/face/faceI.H @@ -199,9 +199,9 @@ inline Foam::label Foam::face::prevLabel(const label i) const } -inline Foam::label Foam::face::nTriangles() const +inline Foam::label Foam::face::nTriangles() const noexcept { - return size() - 2; + return labelList::size() - 2; } diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H index cee935febc..3145dca25a 100644 --- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H +++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H @@ -93,7 +93,7 @@ public: //- Construct from an initializer list of three vertex labels inline explicit triFace(std::initializer_list