From 5d37afc4ea0f2bb7cbd69a30de1d73dd5d413550 Mon Sep 17 00:00:00 2001 From: Christian Willner <34183939+vaeng@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:34:07 +0200 Subject: [PATCH] fix(freelancer-rates): avoid conversion warning in exemplar (#916) --- exercises/concept/freelancer-rates/.meta/exemplar.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/exercises/concept/freelancer-rates/.meta/exemplar.cpp b/exercises/concept/freelancer-rates/.meta/exemplar.cpp index 89d8bc823..590133012 100644 --- a/exercises/concept/freelancer-rates/.meta/exemplar.cpp +++ b/exercises/concept/freelancer-rates/.meta/exemplar.cpp @@ -19,9 +19,8 @@ int monthly_rate(double hourly_rate, double discount) { int workdays_per_month{22}; double per_month{per_day * workdays_per_month}; double after_discount{apply_discount(per_month, discount)}; - int rounded_up{std::ceil(after_discount)}; - - return rounded_up; + // Round up with std::ceil + return std::ceil(after_discount); } // days_in_budget calculates the number of workdays given a budget, hourly rate,