summaryrefslogtreecommitdiff
path: root/src/shader.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-06-21 11:51:29 +0200
committerGitHub <noreply@github.com>2017-06-21 11:51:29 +0200
commit1425c6def156840b359b90b4f32b9c7b8f005731 (patch)
tree0390ed5ad9bcf481416061446f859b3f48955422 /src/shader.h
parent12aad731adef495dec03f384d10b4f8f57b6a1d3 (diff)
downloadminetest-1425c6def156840b359b90b4f32b9c7b8f005731.tar.gz
minetest-1425c6def156840b359b90b4f32b9c7b8f005731.tar.bz2
minetest-1425c6def156840b359b90b4f32b9c7b8f005731.zip
Cpp11 initializers: last src root changeset (#6022)
* Cpp11 initializers: last src root changeset Finish to migrate all src root folder files to C++11 constructor initializers
Diffstat (limited to 'src/shader.h')
-rw-r--r--src/shader.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/shader.h b/src/shader.h
index 4d31f705f..979318c95 100644
--- a/src/shader.h
+++ b/src/shader.h
@@ -44,16 +44,13 @@ std::string getShaderPath(const std::string &name_of_shader,
const std::string &filename);
struct ShaderInfo {
- std::string name;
- video::E_MATERIAL_TYPE base_material;
- video::E_MATERIAL_TYPE material;
- u8 drawtype;
- u8 material_type;
- s32 user_data;
-
- ShaderInfo(): name(""), base_material(video::EMT_SOLID),
- material(video::EMT_SOLID),
- drawtype(0), material_type(0) {}
+ std::string name = "";
+ video::E_MATERIAL_TYPE base_material = video::EMT_SOLID;
+ video::E_MATERIAL_TYPE material = video::EMT_SOLID;
+ u8 drawtype = 0;
+ u8 material_type = 0;
+
+ ShaderInfo() {}
virtual ~ShaderInfo() {}
};
@@ -85,11 +82,11 @@ template <typename T, std::size_t count=1>
class CachedShaderSetting {
const char *m_name;
T m_sent[count];
- bool has_been_set;
+ bool has_been_set = false;
bool is_pixel;
protected:
CachedShaderSetting(const char *name, bool is_pixel) :
- m_name(name), has_been_set(false), is_pixel(is_pixel)
+ m_name(name), is_pixel(is_pixel)
{}
public:
void set(const T value[count], video::IMaterialRendererServices *services)