From b204bc4da91f6f0bf38cc284693450afc5787512 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 17 Aug 2017 08:26:52 +0200 Subject: clientmap, clientmedia: code modernization * use range-based for loops * simplify some tests * various code style fixes * remove debugprint in ClientMap::getBackgroundBrightness, debug code was not intended to be there * remove unused fields in MapDrawControl * use emplace_back instead of push_back when necessary --- src/clientmedia.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/clientmedia.h') diff --git a/src/clientmedia.h b/src/clientmedia.h index 1834fb67f..d6eaf4c72 100644 --- a/src/clientmedia.h +++ b/src/clientmedia.h @@ -42,10 +42,10 @@ public: float getProgress() const { if (m_uncached_count >= 1) - return 1.0 * m_uncached_received_count / + return 1.0f * m_uncached_received_count / m_uncached_count; - else - return 0.0; + + return 0.0f; } bool isStarted() const { -- cgit v1.2.3