1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Code modernization: src/n*, src/o* (#6280)

* Code modernization: src/n*, src/o*

* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* remove unused IWritableNodeDefManager::clone()
* C++ STL header style
* Pointer constness in some functions
This commit is contained in:
Loïc Blot 2017-08-19 11:30:46 +02:00 committed by GitHub
parent 4a1265ceb5
commit 1992db1395
12 changed files with 207 additions and 287 deletions

View file

@ -60,12 +60,10 @@ void NodeTimerList::serialize(std::ostream &os, u8 map_format_version) const
writeU16(os, m_timers.size());
}
for (std::multimap<double, NodeTimer>::const_iterator
i = m_timers.begin();
i != m_timers.end(); ++i) {
NodeTimer t = i->second;
for (const auto &timer : m_timers) {
NodeTimer t = timer.second;
NodeTimer nt = NodeTimer(t.timeout,
t.timeout - (f32)(i->first - m_time), t.position);
t.timeout - (f32)(timer.first - m_time), t.position);
v3s16 p = t.position;
u16 p16 = p.Z * MAP_BLOCKSIZE * MAP_BLOCKSIZE + p.Y * MAP_BLOCKSIZE + p.X;