From a5105c40778b1392b69aafcf889a57c563aa2335 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 23 May 2019 15:10:45 -0700 Subject: fixup! uhdlib: add rational approximation to math utilities --- host/lib/include/uhdlib/utils/math.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/lib/include/uhdlib/utils/math.hpp b/host/lib/include/uhdlib/utils/math.hpp index 24db23c50..bcb1b4395 100644 --- a/host/lib/include/uhdlib/utils/math.hpp +++ b/host/lib/include/uhdlib/utils/math.hpp @@ -62,7 +62,7 @@ std::pair rational_approximation( // then repeating the algorithm on the fractional part of that mixed // number until a maximum number of terms or the fractional part is // nearly zero. - for (int i = 0; i < MAX_APPROXIMATIONS; ++i) { + for (size_t i = 0; i < MAX_APPROXIMATIONS; ++i) { double x = std::floor(1.0 / c); c = (1.0 / c) - x; -- cgit v1.2.3