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

@ -508,10 +508,10 @@ Foam::Ostream& Foam::operator<<
Foam::Ostream& Foam::operator<<
(
Ostream& os,
const InfoProxy<wallBoundedParticle>& ip
const InfoProxy<wallBoundedParticle>& iproxy
)
{
const wallBoundedParticle& p = ip.t_;
const auto& p = *iproxy;
tetPointRef tpr(p.currentTetIndices().tet(p.mesh()));

View File

@ -260,25 +260,25 @@ public:
);
// Info
// Info
//- Return info proxy.
// Used to print particle information to a stream
inline InfoProxy<wallBoundedParticle> info() const
{
return *this;
}
//- Return info proxy,
//- used to print particle information to a stream
InfoProxy<wallBoundedParticle> info() const noexcept
{
return *this;
}
// I-O
// I-O
//- Read
template<class CloudType>
static void readFields(CloudType&);
//- Read
template<class CloudType>
static void readFields(CloudType&);
//- Write
template<class CloudType>
static void writeFields(const CloudType&);
//- Write
template<class CloudType>
static void writeFields(const CloudType&);
// Ostream Operator