COMMON: Fix very noisy warning when building with GCC 9 in C++11 mode
This commit is contained in:
parent
038183301a
commit
6a627e3e98
2 changed files with 6 additions and 0 deletions
|
@ -51,6 +51,11 @@ Rational::Rational(int num, int denom) {
|
||||||
cancel();
|
cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rational::Rational(const Rational &rational) {
|
||||||
|
_num = rational._num;
|
||||||
|
_denom = rational._denom;
|
||||||
|
}
|
||||||
|
|
||||||
void Rational::cancel() {
|
void Rational::cancel() {
|
||||||
// Cancel the fraction by dividing both the num and the denom
|
// Cancel the fraction by dividing both the num and the denom
|
||||||
// by their greatest common divisor.
|
// by their greatest common divisor.
|
||||||
|
|
|
@ -34,6 +34,7 @@ public:
|
||||||
Rational();
|
Rational();
|
||||||
Rational(int num);
|
Rational(int num);
|
||||||
Rational(int num, int denom);
|
Rational(int num, int denom);
|
||||||
|
Rational(const Rational &rational);
|
||||||
|
|
||||||
Rational &operator=(const Rational &right);
|
Rational &operator=(const Rational &right);
|
||||||
Rational &operator=(int right);
|
Rational &operator=(int right);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue