1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-22 12:25:23 +02:00

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
This commit is contained in:
Loic Blot
2017-08-17 08:26:52 +02:00
parent 3e80bf933f
commit b204bc4da9
5 changed files with 69 additions and 123 deletions

View File

@@ -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 {