summaryrefslogtreecommitdiff
path: root/src/nodetimer.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-19 11:30:46 +0200
committerGitHub <noreply@github.com>2017-08-19 11:30:46 +0200
commit1992db1395d9c068327a7c08bac7a24ef7112274 (patch)
tree3fb4982e4662a9519e08b57cab228c6b26d4a57f /src/nodetimer.h
parent4a1265ceb5919c53efaa8c50bbb0fe7955aa47aa (diff)
downloadminetest-1992db1395d9c068327a7c08bac7a24ef7112274.tar.gz
minetest-1992db1395d9c068327a7c08bac7a24ef7112274.tar.bz2
minetest-1992db1395d9c068327a7c08bac7a24ef7112274.zip
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
Diffstat (limited to 'src/nodetimer.h')
-rw-r--r--src/nodetimer.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nodetimer.h b/src/nodetimer.h
index 36eabafda..40e54ccc5 100644
--- a/src/nodetimer.h
+++ b/src/nodetimer.h
@@ -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);