diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-19 11:30:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-19 11:30:46 +0200 |
commit | 1992db1395d9c068327a7c08bac7a24ef7112274 (patch) | |
tree | 3fb4982e4662a9519e08b57cab228c6b26d4a57f /src/nodedef.h | |
parent | 4a1265ceb5919c53efaa8c50bbb0fe7955aa47aa (diff) | |
download | minetest-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/nodedef.h')
-rw-r--r-- | src/nodedef.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/nodedef.h b/src/nodedef.h index f3fb834bc..22ed2f127 100644 --- a/src/nodedef.h +++ b/src/nodedef.h @@ -137,7 +137,7 @@ public: bool enable_mesh_cache; bool enable_minimap; - TextureSettings() {} + TextureSettings() = default; void readSettings(); }; @@ -369,7 +369,7 @@ struct ContentFeatures */ ContentFeatures(); - ~ContentFeatures(); + ~ContentFeatures() = default; void reset(); void serialize(std::ostream &os, u16 protocol_version) const; void deSerialize(std::istream &is); @@ -411,8 +411,9 @@ struct ContentFeatures class INodeDefManager { public: - INodeDefManager(){} - virtual ~INodeDefManager(){} + INodeDefManager() = default; + virtual ~INodeDefManager() = default; + // Get node definition virtual const ContentFeatures &get(content_t c) const=0; virtual const ContentFeatures &get(const MapNode &n) const=0; @@ -438,9 +439,9 @@ public: class IWritableNodeDefManager : public INodeDefManager { public: - IWritableNodeDefManager(){} - virtual ~IWritableNodeDefManager(){} - virtual IWritableNodeDefManager* clone()=0; + IWritableNodeDefManager() = default; + virtual ~IWritableNodeDefManager() = default; + // Get node definition virtual const ContentFeatures &get(content_t c) const=0; virtual const ContentFeatures &get(const MapNode &n) const=0; |