mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
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
This commit is contained in:
parent
12aad731ad
commit
1425c6def1
20 changed files with 127 additions and 223 deletions
19
src/shader.h
19
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;
|
||||
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(): name(""), base_material(video::EMT_SOLID),
|
||||
material(video::EMT_SOLID),
|
||||
drawtype(0), 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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue