mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: copy assignment, bool comparison for polynomialFunction
This commit is contained in:
@ -230,6 +230,17 @@ Foam::polynomialFunction::integralMinus1(const scalar intConstant) const
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::polynomialFunction::operator==(const polynomialFunction& rhs) const
|
||||
{
|
||||
return
|
||||
(
|
||||
scalarList::operator==(static_cast<const scalarList&>(rhs))
|
||||
&& logActive_ == rhs.logActive_
|
||||
&& (!logActive_ || (logCoeff_ == rhs.logCoeff_))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::polynomialFunction&
|
||||
Foam::polynomialFunction::operator+=(const polynomialFunction& poly)
|
||||
{
|
||||
|
||||
@ -108,9 +108,6 @@ class polynomialFunction
|
||||
//- Check size is non-zero or trigger FatalErrot
|
||||
void checkSize() const;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const polynomialFunction&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -190,6 +187,14 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Equality of coefficients, and logCoeff (if active)
|
||||
bool operator==(const polynomialFunction& rhs) const;
|
||||
|
||||
bool operator!=(const polynomialFunction& rhs) const
|
||||
{
|
||||
return !operator==(rhs);
|
||||
}
|
||||
|
||||
polynomialFunction& operator+=(const polynomialFunction&);
|
||||
polynomialFunction& operator-=(const polynomialFunction&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user