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

@ -654,7 +654,7 @@ Foam::Ostream& Foam::operator<<
const InfoProxy<PDRobstacle>& iproxy
)
{
const PDRobstacle& obs = iproxy.t_;
const auto& obs = *iproxy;
switch (obs.typeId)
{

View File

@ -37,8 +37,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef PDRobstacle_H
#define PDRobstacle_H
#ifndef Foam_PDRobstacle_H
#define Foam_PDRobstacle_H
#include "InfoProxy.H"
#include "labelPair.H"
@ -290,8 +290,9 @@ public:
// IOstream Operators
//- Return info proxy.
InfoProxy<PDRobstacle> info() const
//- Return info proxy,
//- used to print information to a stream
InfoProxy<PDRobstacle> info() const noexcept
{
return *this;
}