Commit 9056422b authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

Exercice 39 solution now compiles...

parent 68026796
......@@ -184,7 +184,7 @@ IntT operator*(const PowerOfTwoApprox<IntT>& approx, IntT coefficient)
bool is_overflow { false };
// static_cast for the sake of `short` case: short + short -> int!
IntT ret = static_cast<IntT>(times_power_of_2<IntT>(is_overflow,
IntT ret = static_cast<IntT>(times_power_of_2(is_overflow,
approx.Numerator() * coefficient,
......@@ -438,7 +438,6 @@ void TestDisplaySum<IntT>::Display(int Nbits, double value1, IntT coefficient1,
// Ugly trick to circumvent the fact we can't add a new argument to operator* to get the value of `overflow`
// boolean. Fortunately we'll see a bit later how to deal properly with this.
bool is_overflow { false };
if (approx == std::numeric_limits<IntT>::max())
is_overflow = true;
Supports Markdown
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