diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2017-08-17 08:26:52 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2017-08-17 08:26:52 +0200 |
commit | b204bc4da91f6f0bf38cc284693450afc5787512 (patch) | |
tree | d3a7b1e979df80838727d66c1d9ec5a352e6ff35 /src/clientmedia.h | |
parent | 3e80bf933f890c95badbf8896d6a89f4bb708389 (diff) | |
download | minetest-b204bc4da91f6f0bf38cc284693450afc5787512.tar.gz minetest-b204bc4da91f6f0bf38cc284693450afc5787512.tar.bz2 minetest-b204bc4da91f6f0bf38cc284693450afc5787512.zip |
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
Diffstat (limited to 'src/clientmedia.h')
-rw-r--r-- | src/clientmedia.h | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |