mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Const correctness improvements:
removed some unnecessary const_casts that remove const.
This commit is contained in:
parent
30f7a2b8e5
commit
9406b50447
13 changed files with 41 additions and 40 deletions
|
@ -142,7 +142,7 @@ bool GLShader::load_from_file(const char* fragment_shader_filename, const char*
|
|||
int file_length = (int)vs.tellg();
|
||||
vs.seekg(0, vs.beg);
|
||||
std::string vertex_shader(file_length, '\0');
|
||||
vs.read(const_cast<char*>(vertex_shader.data()), file_length);
|
||||
vs.read(vertex_shader.data(), file_length);
|
||||
if (!vs.good())
|
||||
return false;
|
||||
|
||||
|
@ -156,7 +156,7 @@ bool GLShader::load_from_file(const char* fragment_shader_filename, const char*
|
|||
file_length = (int)fs.tellg();
|
||||
fs.seekg(0, fs.beg);
|
||||
std::string fragment_shader(file_length, '\0');
|
||||
fs.read(const_cast<char*>(fragment_shader.data()), file_length);
|
||||
fs.read(fragment_shader.data(), file_length);
|
||||
if (!fs.good())
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue