Skip to content
Snippets Groups Projects
Commit f5874937 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: copy assignment, bool comparison for polynomialFunction

parent 087e963a
Branches
Tags
No related merge requests found
......@@ -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&);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment