STYLE: relocate some friend operations to be global ones

This commit is contained in:
Mark Olesen
2017-05-04 02:39:57 +02:00
parent 5d541defe6
commit f7e502d459
20 changed files with 118 additions and 141 deletions

View File

@ -77,10 +77,6 @@ class Random;
// Forward declaration of friend functions and operators
class treeBoundBox;
bool operator==(const treeBoundBox& a, const treeBoundBox& b);
bool operator!=(const treeBoundBox& a, const treeBoundBox& b);
Istream& operator>>(Istream& is, treeBoundBox& bb);
Ostream& operator<<(Ostream& os, const treeBoundBox& bb);
@ -340,12 +336,6 @@ public:
inline treeBoundBox extend(Random& rndGen, const scalar s) const;
// Friend Operators
friend bool operator==(const treeBoundBox& a, const treeBoundBox& b);
friend bool operator!=(const treeBoundBox& a, const treeBoundBox& b);
// IOstream operator
friend Istream& operator>>(Istream& is, treeBoundBox& bb);
@ -358,6 +348,12 @@ template<>
inline bool contiguous<treeBoundBox>() {return contiguous<boundBox>();}
// Global Operators
inline bool operator==(const treeBoundBox& a, const treeBoundBox& b);
inline bool operator!=(const treeBoundBox& a, const treeBoundBox& b);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam