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:
@ -33,10 +33,10 @@ template<class Gt, class Cb>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const InfoProxy<CGAL::indexedCell<Gt, Cb>>& p
|
||||
const InfoProxy<CGAL::indexedCell<Gt, Cb>>& iproxy
|
||||
)
|
||||
{
|
||||
const CGAL::indexedCell<Gt, Cb>& iv = p.t_;
|
||||
const auto& iv = *iproxy;
|
||||
|
||||
os << "Cell: ";
|
||||
|
||||
|
||||
@ -249,9 +249,9 @@ public:
|
||||
|
||||
// Info
|
||||
|
||||
//- Return info proxy.
|
||||
// Used to print indexedCell information to a stream
|
||||
Foam::InfoProxy<indexedCell<Gt, Cb>> info() const
|
||||
//- Return info proxy,
|
||||
//- used to print information to a stream
|
||||
Foam::InfoProxy<indexedCell<Gt, Cb>> info() const noexcept
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
@ -261,7 +261,6 @@ public:
|
||||
Foam::Ostream&,
|
||||
const Foam::InfoProxy<indexedCell<Gt, Cb>>&
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -156,10 +156,10 @@ template<class Gt, class Vb>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const InfoProxy<CGAL::indexedVertex<Gt, Vb>>& p
|
||||
const InfoProxy<CGAL::indexedVertex<Gt, Vb>>& iproxy
|
||||
)
|
||||
{
|
||||
const CGAL::indexedVertex<Gt, Vb>& iv = p.t_;
|
||||
const auto& iv = *iproxy;
|
||||
|
||||
const Foam::point pt
|
||||
(
|
||||
|
||||
@ -313,8 +313,9 @@ public:
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
//- Info proxy, to print information to a stream
|
||||
Foam::InfoProxy<indexedVertex<Gt, Vb>> info() const
|
||||
//- Return info proxy,
|
||||
//- used to print information to a stream
|
||||
Foam::InfoProxy<indexedVertex<Gt, Vb>> info() const noexcept
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -654,7 +654,7 @@ Foam::Ostream& Foam::operator<<
|
||||
const InfoProxy<PDRobstacle>& iproxy
|
||||
)
|
||||
{
|
||||
const PDRobstacle& obs = iproxy.t_;
|
||||
const auto& obs = *iproxy;
|
||||
|
||||
switch (obs.typeId)
|
||||
{
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user