From 7528986e4449febead9b18b6118f0b096f7cf800 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Sat, 19 Aug 2017 14:25:35 +0200 Subject: 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 --- src/shader.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/shader.h') 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();} -- cgit v1.2.3