STYLE: return orientedType, Switch directly instead of const reference

- noexcept on some Time methods

ENH: pass through is_oriented() method for clearer coding

- use logical and/or/xor instead of bitwise versions (clearer intent)
This commit is contained in:
Mark Olesen
2022-08-23 15:58:32 +02:00
parent 867b5e9060
commit ea51c2c0e4
22 changed files with 114 additions and 160 deletions

View File

@ -36,8 +36,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef volumeType_H
#define volumeType_H
#ifndef Foam_volumeType_H
#define Foam_volumeType_H
#include "contiguous.H"
#include "Enum.H"
@ -89,14 +89,14 @@ public:
// Constructors
//- Construct null as UNKNOWN state
volumeType()
//- Default construct as \c UNKNOWN state
constexpr volumeType() noexcept
:
t_(UNKNOWN)
{}
//- Construct from enumeration
volumeType(type t)
//- Implicit construct from enumeration
volumeType(type t) noexcept
:
t_(t)
{}
@ -123,7 +123,7 @@ public:
const word& str() const;
// IOstream operators
// IOstream Operators
friend Istream& operator>>(Istream& is, volumeType& vt);
friend Ostream& operator<<(Ostream& os, const volumeType& vt);