diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-25 15:02:47 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-29 09:23:46 +0200 |
commit | 0157009f2293a255e2de682832ef9074924dd4b5 (patch) | |
tree | ba9b684ddba92e43fd23b0cb6bc3596e865c18b7 /tools/source | |
parent | 05eed2888c8e33257137536453a84f4c458dd249 (diff) |
cid#1371160 Missing move assignment operator
Change-Id: Ifcddd08cd1ec6bfb7679ee0433524c4bd68803dd
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/generic/fract.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx index 2a7ad54983eb..c79b24bbf3a3 100644 --- a/tools/source/generic/fract.cxx +++ b/tools/source/generic/fract.cxx @@ -62,6 +62,10 @@ Fraction::Fraction( const Fraction& rFrac ) : mpImpl(new Impl) mpImpl->value.assign( rFrac.mpImpl->value.numerator(), rFrac.mpImpl->value.denominator() ); } +Fraction::Fraction( Fraction&& rFrac ) : mpImpl(std::move(rFrac.mpImpl)) +{ +} + // Initialized by setting nNum as nominator and nDen as denominator // Negative values in the denominator are invalid and cause the // inversion of both nominator and denominator signs @@ -271,6 +275,12 @@ Fraction& Fraction::operator=( const Fraction& rFrac ) return *this; } +Fraction& Fraction::operator=( Fraction&& rFrac ) +{ + mpImpl = std::move(rFrac.mpImpl); + return *this; +} + bool Fraction::IsValid() const { return mpImpl->valid; |