diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-19 14:25:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-19 14:25:35 +0200 |
commit | 7528986e4449febead9b18b6118f0b096f7cf800 (patch) | |
tree | 8e526c1403ba8d0689ab40a24165fc19d8a07e27 /src/shader.h | |
parent | 1992db1395d9c068327a7c08bac7a24ef7112274 (diff) | |
download | minetest-7528986e4449febead9b18b6118f0b096f7cf800.tar.gz minetest-7528986e4449febead9b18b6118f0b096f7cf800.tar.bz2 minetest-7528986e4449febead9b18b6118f0b096f7cf800.zip |
Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial)
* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* C++ STL header style
* Spelling: vertice -> vertex
Diffstat (limited to 'src/shader.h')
-rw-r--r-- | src/shader.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/shader.h b/src/shader.h index 7a7ee3e7b..583c776f4 100644 --- a/src/shader.h +++ b/src/shader.h @@ -49,8 +49,8 @@ struct ShaderInfo { u8 drawtype = 0; u8 material_type = 0; - ShaderInfo() {} - virtual ~ShaderInfo() {} + ShaderInfo() = default; + virtual ~ShaderInfo() = default; }; /* @@ -64,7 +64,7 @@ namespace irr { namespace video { class IShaderConstantSetter { public: - virtual ~IShaderConstantSetter(){}; + virtual ~IShaderConstantSetter() = default; virtual void onSetConstants(video::IMaterialRendererServices *services, bool is_highlevel) = 0; }; @@ -72,7 +72,7 @@ public: class IShaderConstantSetterFactory { public: - virtual ~IShaderConstantSetterFactory() {}; + virtual ~IShaderConstantSetterFactory() = default; virtual IShaderConstantSetter* create() = 0; }; @@ -122,8 +122,9 @@ public: class IShaderSource { public: - IShaderSource(){} - virtual ~IShaderSource(){} + IShaderSource() = default; + virtual ~IShaderSource() = default; + virtual u32 getShaderIdDirect(const std::string &name, const u8 material_type, const u8 drawtype){return 0;} virtual ShaderInfo getShaderInfo(u32 id){return ShaderInfo();} @@ -133,8 +134,9 @@ public: class IWritableShaderSource : public IShaderSource { public: - IWritableShaderSource(){} - virtual ~IWritableShaderSource(){} + IWritableShaderSource() = default; + virtual ~IWritableShaderSource() = default; + virtual u32 getShaderIdDirect(const std::string &name, const u8 material_type, const u8 drawtype){return 0;} virtual ShaderInfo getShaderInfo(u32 id){return ShaderInfo();} |