aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Bouclet2019-11-10 21:04:29 +0100
committerBastien Bouclet2019-11-10 21:04:29 +0100
commit6a627e3e98c468a7652d79eedfb141ed11ffb8c5 (patch)
tree3bdc432fd988fe951e6243a45c87951f9eef8b4e
parent038183301a416a795b4c134b2d0c23728f98f24b (diff)
downloadscummvm-rg350-6a627e3e98c468a7652d79eedfb141ed11ffb8c5.tar.gz
scummvm-rg350-6a627e3e98c468a7652d79eedfb141ed11ffb8c5.tar.bz2
scummvm-rg350-6a627e3e98c468a7652d79eedfb141ed11ffb8c5.zip
COMMON: Fix very noisy warning when building with GCC 9 in C++11 mode
-rw-r--r--common/rational.cpp5
-rw-r--r--common/rational.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/common/rational.cpp b/common/rational.cpp
index 90e44576a7..84c1e4bee0 100644
--- a/common/rational.cpp
+++ b/common/rational.cpp
@@ -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.
diff --git a/common/rational.h b/common/rational.h
index 89caaf25b4..bd240c99f3 100644
--- a/common/rational.h
+++ b/common/rational.h
@@ -34,6 +34,7 @@ public:
Rational();
Rational(int num);
Rational(int num, int denom);
+ Rational(const Rational &rational);
Rational &operator=(const Rational &right);
Rational &operator=(int right);