mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use noexcept creation of InfoProxy and dereference as '*iproxy'
- this removes the 'magic' use of the exposed t_ member in favour of a generic dereference
This commit is contained in:
@ -254,8 +254,9 @@ public:
|
||||
|
||||
// Output
|
||||
|
||||
//- Return info proxy
|
||||
InfoProxy<ensightCells> info() const { return *this; }
|
||||
//- Return info proxy,
|
||||
//- used to print information to a stream
|
||||
InfoProxy<ensightCells> info() const noexcept { return *this; }
|
||||
|
||||
|
||||
//- Globally unique mesh points. Required when writing point fields.
|
||||
@ -281,6 +282,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//- Print information via proxy
|
||||
template<>
|
||||
Ostream& operator<<(Ostream&, const InfoProxy<ensightCells>&);
|
||||
|
||||
|
||||
@ -336,10 +336,10 @@ template<>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const InfoProxy<ensightCells>& ip
|
||||
const InfoProxy<ensightCells>& iproxy
|
||||
)
|
||||
{
|
||||
const ensightCells& part = ip.t_;
|
||||
const auto& part = *iproxy;
|
||||
|
||||
os << part.name().c_str();
|
||||
|
||||
|
||||
@ -247,8 +247,9 @@ public:
|
||||
|
||||
// Output
|
||||
|
||||
//- Return info proxy
|
||||
InfoProxy<ensightFaces> info() const { return *this; }
|
||||
//- Return info proxy,
|
||||
//- used to print information to a stream
|
||||
InfoProxy<ensightFaces> info() const noexcept { return *this; }
|
||||
|
||||
|
||||
//- Globally unique mesh points.
|
||||
@ -274,6 +275,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//- Print information via proxy
|
||||
template<>
|
||||
Ostream& operator<<(Ostream&, const InfoProxy<ensightFaces>&);
|
||||
|
||||
|
||||
@ -141,10 +141,10 @@ template<>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const InfoProxy<ensightFaces>& ip
|
||||
const InfoProxy<ensightFaces>& iproxy
|
||||
)
|
||||
{
|
||||
const ensightFaces& part = ip.t_;
|
||||
const auto& part = *iproxy;
|
||||
|
||||
os << part.name().c_str();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user