From 0e95ec8953ed3e404e2e10d2a91ff4a0fdfcf1a6 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 1 Mar 2024 23:23:44 +0100 Subject: fix build --- compat/debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compat/debug.cpp') diff --git a/compat/debug.cpp b/compat/debug.cpp index 0c7a6fd1..2b900180 100644 --- a/compat/debug.cpp +++ b/compat/debug.cpp @@ -54,7 +54,7 @@ template struct Quoted; Debug& operator<<(Debug& dbg, Fraction f) { char fmt[8], buf[56]; - std::snprintf(fmt, sizeof fmt, "%%.%hhuf", f.decimal_points); + std::snprintf(fmt, sizeof fmt, "%%.%uf", (unsigned)f.decimal_points); std::snprintf(buf, sizeof buf, fmt, (double)f.value); dbg << buf; return dbg; @@ -70,6 +70,6 @@ Colon colon(char c) { return Colon{c}; } ErrorString error_string(int error) { return { error }; } ErrorString error_string() { return { errno }; } -Fraction fraction(float value, uint8_t decimal_points) { return Fraction { value, decimal_points }; } +Fraction fraction(float value, int decimal_points) { return Fraction { value, decimal_points }; } } // namespace floormat -- cgit v1.2.3