diff --git a/applications/test/List/Test-List.C b/applications/test/List/Test-List.C index e676a859a4..03e77dcfef 100644 --- a/applications/test/List/Test-List.C +++ b/applications/test/List/Test-List.C @@ -81,7 +81,7 @@ namespace ListPolicy { // Override on a per-type basis -template<> struct short_length : std::integral_constant {}; +template<> struct short_length : std::integral_constant {}; } // End namespace ListPolicy } // End namespace Detail diff --git a/applications/test/minMax2/Test-minMax2.C b/applications/test/minMax2/Test-minMax2.C index 136681d75c..ec02d21d3d 100644 --- a/applications/test/minMax2/Test-minMax2.C +++ b/applications/test/minMax2/Test-minMax2.C @@ -146,7 +146,7 @@ int main(int argc, char *argv[]) Random rnd(4567); for (scalar& val : someField) { - val = rnd.position(-0.2, 1.2); + val = rnd.position(scalar(-0.2), scalar(1.2)); } Info<< nl @@ -171,6 +171,7 @@ int main(int argc, char *argv[]) // nope << " : " << clamp(val, zero_one{}) // nope << " : " << clamp(val, scalarMinMax(zero_one{})) << " : " << clamp(val, 0, 1) + << " : " << clamp(val, zero_one{}) << nl; } diff --git a/applications/test/sizeof/Test-sizeof.C b/applications/test/sizeof/Test-sizeof.C index a5bd8ce9a7..13f0aac07a 100644 --- a/applications/test/sizeof/Test-sizeof.C +++ b/applications/test/sizeof/Test-sizeof.C @@ -33,7 +33,7 @@ Description #include "Switch.H" #include "string.H" #include "dictionary.H" -#include "nil.H" +#include "zero.H" #include "IOstreams.H" #include "PstreamBuffers.H" #include "argList.H" @@ -82,8 +82,8 @@ int main(int argc, char *argv[]) } { - nil x; - cout<<"nil:" << sizeof(x) << nl; + zero x; + cout<<"zero:" << sizeof(x) << nl; } #if 0 { diff --git a/applications/utilities/mesh/advanced/selectCells/edgeStats.H b/applications/utilities/mesh/advanced/selectCells/edgeStats.H index 79e70feba3..d197fdcb30 100644 --- a/applications/utilities/mesh/advanced/selectCells/edgeStats.H +++ b/applications/utilities/mesh/advanced/selectCells/edgeStats.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef edgeStats_H -#define edgeStats_H +#ifndef Foam_edgeStats_H +#define Foam_edgeStats_H #include "direction.H" #include "scalar.H" @@ -45,9 +45,8 @@ SourceFiles namespace Foam { -// Forward declaration of classes +// Forward Declarations class polyMesh; -class Ostream; class twoDPointCorrector; /*---------------------------------------------------------------------------*\ diff --git a/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleTypes.C b/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleTypes.C index 31c559d86f..04e798cf0c 100644 --- a/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleTypes.C +++ b/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleTypes.C @@ -62,7 +62,7 @@ namespace Foam // Volume porosity -> blockage inline scalar getPorosity(const dictionary& dict) { - return 1 - clamp(dict.getOrDefault("porosity", 0), 0, 1); + return 1 - clamp(dict.getOrDefault("porosity", 0), zero_one{}); } // Direction porosities -> blockage @@ -74,7 +74,7 @@ inline vector getPorosities(const dictionary& dict) { for (scalar& val : blockage) { - val = 1 - clamp(val, 0, 1); + val = 1 - clamp(val, zero_one{}); } } diff --git a/applications/utilities/preProcessing/setAlphaField/setAlphaField.C b/applications/utilities/preProcessing/setAlphaField/setAlphaField.C index 1db1a547f4..78f9b77e55 100644 --- a/applications/utilities/preProcessing/setAlphaField/setAlphaField.C +++ b/applications/utilities/preProcessing/setAlphaField/setAlphaField.C @@ -108,7 +108,7 @@ void setAlpha { cutCell.calcSubCell(cellI, 0.0); - alpha1[cellI] = clamp(cutCell.VolumeOfFluid(), 0, 1); + alpha1[cellI] = clamp(cutCell.VolumeOfFluid(), zero_one{}); if (writeOBJ && (mag(cutCell.faceArea()) >= 1e-14)) { diff --git a/src/OSspecific/MSwindows/cpuInfo/cpuInfo.H b/src/OSspecific/MSwindows/cpuInfo/cpuInfo.H index 5b175074cb..7da2ac5bc6 100644 --- a/src/OSspecific/MSwindows/cpuInfo/cpuInfo.H +++ b/src/OSspecific/MSwindows/cpuInfo/cpuInfo.H @@ -50,7 +50,7 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations class Ostream; /*---------------------------------------------------------------------------*\ diff --git a/src/OSspecific/POSIX/cpuInfo/cpuInfo.H b/src/OSspecific/POSIX/cpuInfo/cpuInfo.H index f9d5c5646b..37cac03d92 100644 --- a/src/OSspecific/POSIX/cpuInfo/cpuInfo.H +++ b/src/OSspecific/POSIX/cpuInfo/cpuInfo.H @@ -50,7 +50,7 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations class Ostream; /*---------------------------------------------------------------------------*\ diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index b0404996bc..7753533552 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -42,22 +42,21 @@ $(chars)/lists/charUList.C primitives/direction/directionIO.C ints = primitives/ints +$(ints)/uint/uintIO.C $(ints)/uint8/uint8.C -$(ints)/uint8/uint8IO.C $(ints)/uint16/uint16.C $(ints)/uint32/uint32.C $(ints)/uint32/uint32IO.C $(ints)/uint64/uint64.C $(ints)/uint64/uint64IO.C -$(ints)/uint/uintIO.C +$(ints)/uLabel/uLabel.C +$(ints)/int/intIO.C $(ints)/int16/int16.C $(ints)/int32/int32.C $(ints)/int32/int32IO.C $(ints)/int64/int64.C $(ints)/int64/int64IO.C -$(ints)/int/intIO.C $(ints)/label/label.C -$(ints)/uLabel/uLabel.C $(ints)/lists/labelList.C $(ints)/lists/labelIOList.C $(ints)/lists/labelListIOList.C diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H index 6a93fc4ba6..d1b9aaf3ca 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H @@ -48,7 +48,6 @@ namespace Foam { // Forward Declarations -class Istream; template class dynamicIndexedOctree; template Ostream& operator<<(Ostream&, const dynamicIndexedOctree&); diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H index 3b9878365c..c9c7887e92 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H @@ -53,7 +53,6 @@ namespace Foam { // Forward Declarations -class Istream; template class indexedOctree; template Ostream& operator<<(Ostream&, const indexedOctree&); diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/ILList/ILList.H b/src/OpenFOAM/containers/LinkedLists/accessTypes/ILList/ILList.H index 038cfb7383..984c3c5400 100644 --- a/src/OpenFOAM/containers/LinkedLists/accessTypes/ILList/ILList.H +++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/ILList/ILList.H @@ -47,9 +47,6 @@ namespace Foam { // Forward Declarations - -class Istream; -class Ostream; template class ILList; template Istream& operator>> diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/LList/LList.H b/src/OpenFOAM/containers/LinkedLists/accessTypes/LList/LList.H index c99dc344cd..9e7e39311c 100644 --- a/src/OpenFOAM/containers/LinkedLists/accessTypes/LList/LList.H +++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/LList/LList.H @@ -48,10 +48,6 @@ namespace Foam { // Forward Declarations - -class Istream; -class Ostream; - template class LList; template diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H index 7c3448af24..c97c523968 100644 --- a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H +++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H @@ -49,8 +49,6 @@ namespace Foam { // Forward Declarations -class Ostream; - template class UILList; template diff --git a/src/OpenFOAM/containers/Lists/List/UList.H b/src/OpenFOAM/containers/Lists/List/UList.H index 2c6339e1c9..01d5d1b562 100644 --- a/src/OpenFOAM/containers/Lists/List/UList.H +++ b/src/OpenFOAM/containers/Lists/List/UList.H @@ -57,7 +57,6 @@ SourceFiles #include "ListPolicy.H" #include -#include #include // i.e, std::vector // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -66,8 +65,6 @@ namespace Foam { // Forward Declarations -class Istream; -class Ostream; class labelRange; template class List; diff --git a/src/OpenFOAM/containers/Lists/List/UListI.H b/src/OpenFOAM/containers/Lists/List/UListI.H index 93f6a1788c..183b5e6893 100644 --- a/src/OpenFOAM/containers/Lists/List/UListI.H +++ b/src/OpenFOAM/containers/Lists/List/UListI.H @@ -27,7 +27,6 @@ License \*---------------------------------------------------------------------------*/ #include "error.H" -#include "pTraits.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/Lists/policy/ListPolicy.H b/src/OpenFOAM/containers/Lists/policy/ListPolicy.H index 7cf2711415..aa63fc7448 100644 --- a/src/OpenFOAM/containers/Lists/policy/ListPolicy.H +++ b/src/OpenFOAM/containers/Lists/policy/ListPolicy.H @@ -31,10 +31,9 @@ Description \*---------------------------------------------------------------------------*/ -#ifndef ListPolicy_H -#define ListPolicy_H +#ifndef Foam_ListPolicy_H +#define Foam_ListPolicy_H -#include "label.H" #include // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,9 +42,9 @@ namespace Foam { // Forward Declarations +class keyType; class word; class wordRe; -class keyType; namespace Detail { @@ -58,11 +57,11 @@ namespace ListPolicy // // Default definition: 10 template -struct short_length : std::integral_constant {}; +struct short_length : std::integral_constant {}; -// Could override on a per-type basis +// Can override on a per-type basis // Eg, -// template<> struct short_length