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:
Mark Olesen
2023-05-17 09:34:09 +02:00
parent a0005c3a54
commit a5d9ad3a5c
52 changed files with 287 additions and 273 deletions

View File

@ -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>&);

View File

@ -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();

View File

@ -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>&);

View File

@ -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();