1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +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

@ -35,12 +35,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class NodeTimer
{
public:
NodeTimer() {}
NodeTimer() = default;
NodeTimer(const v3s16 &position_):
position(position_) {}
NodeTimer(f32 timeout_, f32 elapsed_, v3s16 position_):
timeout(timeout_), elapsed(elapsed_), position(position_) {}
~NodeTimer() {}
~NodeTimer() = default;
void serialize(std::ostream &os) const;
void deSerialize(std::istream &is);
@ -57,8 +57,8 @@ public:
class NodeTimerList
{
public:
NodeTimerList() {}
~NodeTimerList() {}
NodeTimerList() = default;
~NodeTimerList() = default;
void serialize(std::ostream &os, u8 map_format_version) const;
void deSerialize(std::istream &is, u8 map_format_version);
@ -117,10 +117,6 @@ public:
m_next_trigger_time = -1.;
}
inline double getNextTriggerTime() {
return m_next_trigger_time;
}
// Move forward in time, returns elapsed timers
std::vector<NodeTimer> step(float dtime);