mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +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:
parent
4a1265ceb5
commit
1992db1395
12 changed files with 207 additions and 287 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue