COMMON: Fix very noisy warning when building with GCC 9 in C++11 mode

This commit is contained in:
Bastien Bouclet 2019-11-10 21:04:29 +01:00
parent 038183301a
commit 6a627e3e98
2 changed files with 6 additions and 0 deletions

View file

@ -51,6 +51,11 @@ Rational::Rational(int num, int denom) {
cancel();
}
Rational::Rational(const Rational &rational) {
_num = rational._num;
_denom = rational._denom;
}
void Rational::cancel() {
// Cancel the fraction by dividing both the num and the denom
// by their greatest common divisor.