diff --git a/applications/solvers/electromagnetics/magneticFoam/magnet.H b/applications/solvers/electromagnetics/magneticFoam/magnet.H index 9d327351ad..fb95b980c2 100644 --- a/applications/solvers/electromagnetics/magneticFoam/magnet.H +++ b/applications/solvers/electromagnetics/magneticFoam/magnet.H @@ -44,11 +44,7 @@ SourceFiles namespace Foam { -// Forward declaration of classes -class Istream; -class Ostream; - -// Forward declaration of friend functions and operators +// Forward Declarations class magnet; Istream& operator>>(Istream&, magnet&); Ostream& operator<<(Ostream&, const magnet&); diff --git a/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H index 6ba6fec7d0..5060385a01 100644 --- a/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H +++ b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H @@ -337,14 +337,14 @@ public: // IOstream Operators //- Read from Istream, discarding existing contents - inline friend Istream& operator>> + friend Istream& operator>> ( Istream& is, DynamicList& rhs ); //- Write to Ostream - inline friend Ostream& operator<< + friend Ostream& operator<< ( Ostream& os, const DynamicList& rhs diff --git a/src/OpenFOAM/db/IOstreams/output/FlatOutput.H b/src/OpenFOAM/db/IOstreams/output/FlatOutput.H index 399dd081bd..5abbc3de9c 100644 --- a/src/OpenFOAM/db/IOstreams/output/FlatOutput.H +++ b/src/OpenFOAM/db/IOstreams/output/FlatOutput.H @@ -54,8 +54,8 @@ template class OutputAdaptor; template inline Ostream& operator<< ( - Ostream&, - const FlatOutput::OutputAdaptor& + Ostream& os, + const FlatOutput::OutputAdaptor& adaptor ); @@ -187,8 +187,7 @@ public: // Operators //- Ostream Operator - inline friend Ostream& - operator<< + friend Ostream& operator<< ( Ostream& os, const OutputAdaptor& adaptor diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H index ce84afae41..0330f968d3 100644 --- a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H +++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H @@ -271,14 +271,14 @@ public: // IOstream Operators //- Read from Istream, discarding existing contents - inline friend Istream& operator>> + friend Istream& operator>> ( Istream& is, DynamicField& rhs ); //- Write to Ostream - inline friend Ostream& operator<< + friend Ostream& operator<< ( Ostream& os, const DynamicField& rhs diff --git a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H index 039ef49bdd..0d0f20985b 100644 --- a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H +++ b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H @@ -48,8 +48,8 @@ namespace Foam // Forward Declarations class labelledTri; -Istream& operator>>(Istream&, labelledTri&); -Ostream& operator<<(Ostream&, const labelledTri&); +inline Istream& operator>>(Istream&, labelledTri&); +inline Ostream& operator<<(Ostream&, const labelledTri&); /*---------------------------------------------------------------------------*\ Class labelledTri Declaration @@ -119,8 +119,8 @@ public: // IOstream Operators - inline friend Istream& operator>>(Istream&, labelledTri&); - inline friend Ostream& operator<<(Ostream&, const labelledTri&); + friend Istream& operator>>(Istream&, labelledTri&); + friend Ostream& operator<<(Ostream&, const labelledTri&); }; diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMap.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMap.H index f7ace81e86..676ae13729 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMap.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMap.H @@ -45,7 +45,7 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations class objectMap; inline bool operator==(const objectMap& a, const objectMap& b); diff --git a/src/OpenFOAM/meshes/primitiveShapes/line/line.H b/src/OpenFOAM/meshes/primitiveShapes/line/line.H index 612ddbfe55..caf65ef76c 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/line/line.H +++ b/src/OpenFOAM/meshes/primitiveShapes/line/line.H @@ -49,13 +49,7 @@ SourceFiles namespace Foam { -// Forward declaration of classes - -class Istream; -class Ostream; - - -// Forward declaration of friend functions and operators +// Forward Declarations template class line; diff --git a/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H b/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H index 5cc86d3e61..7337b86547 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H +++ b/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H @@ -280,13 +280,13 @@ public: { if (is.format() == IOstream::ASCII) { - return is >> pHit.hit_ >> pHit.point_ >> pHit.index_; + is >> pHit.hit_ >> pHit.point_ >> pHit.index_; } else { // TODO (2019-08-06): // cannot properly handle mixed-precision reading - // owning to bool and Point type. + // owing to bool and Point type. is.read ( diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H index 01c5e3e4d3..6471c3d910 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H +++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H @@ -57,11 +57,9 @@ SourceFiles namespace Foam { -// Forward declarations -class Istream; -class Ostream; -class tetPoints; +// Forward Declarations class plane; +class tetPoints; template class tetrahedron; @@ -310,7 +308,7 @@ public: boundBox bounds() const; - // IOstream operators + // IOstream Operators friend Istream& operator>> ( diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H index e4eb46dc06..b25ccf8724 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H +++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H @@ -54,8 +54,6 @@ namespace Foam { // Forward Declarations -class Istream; -class Ostream; class plane; class triPoints; @@ -355,7 +353,7 @@ public: ) const; - // IOstream operators + // IOstream Operators friend Istream& operator>> ( diff --git a/src/OpenFOAM/primitives/triad/triad.H b/src/OpenFOAM/primitives/triad/triad.H index 27491da9c6..b158b42531 100644 --- a/src/OpenFOAM/primitives/triad/triad.H +++ b/src/OpenFOAM/primitives/triad/triad.H @@ -52,13 +52,11 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations class triad; class quaternion; -class Istream; -class Ostream; -Istream& operator>>(Istream&, triad&); -Ostream& operator<<(Ostream&, const triad&); +inline Istream& operator>>(Istream&, triad&); +inline Ostream& operator<<(Ostream&, const triad&); /*---------------------------------------------------------------------------*\ Class triad Declaration @@ -68,7 +66,6 @@ class triad : public Vector { - public: // Constructors @@ -160,8 +157,8 @@ public: // IOstream Operators - inline friend Istream& operator>>(Istream&, triad&); - inline friend Ostream& operator<<(Ostream&, const triad&); + friend Istream& operator>>(Istream&, triad&); + friend Ostream& operator<<(Ostream&, const triad&); }; diff --git a/src/fileFormats/stl/STLtriangle.H b/src/fileFormats/stl/STLtriangle.H index 318addf4f6..c8e49a23c9 100644 --- a/src/fileFormats/stl/STLtriangle.H +++ b/src/fileFormats/stl/STLtriangle.H @@ -47,9 +47,9 @@ SourceFiles namespace Foam { -// Forward declaration of friend functions and operators +// Forward Declarations class STLtriangle; -Ostream& operator<<(Ostream& os, const STLtriangle& tri); +inline Ostream& operator<<(Ostream& os, const STLtriangle& tri); /*---------------------------------------------------------------------------*\ Class STLtriangle Declaration @@ -141,10 +141,10 @@ public: ); - // Ostream operator + // Ostream Operator //- Print triangle contents - inline friend Ostream& operator<<(Ostream& os, const STLtriangle& tri); + friend Ostream& operator<<(Ostream& os, const STLtriangle& tri); };