mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
memory-related refactor
This commit is contained in:
parent
d437b67580
commit
43903bb378
9 changed files with 41 additions and 36 deletions
|
|
@ -98,7 +98,7 @@ glshader compile_shader(GLenum type, const GLchar* source, const std::string& fi
|
|||
return glshader(new GLuint(shader), shader_deleter);
|
||||
}
|
||||
|
||||
Shader* Shader::create(
|
||||
std::unique_ptr<Shader> Shader::create(
|
||||
const std::string& vertexFile,
|
||||
const std::string& fragmentFile,
|
||||
const std::string& vertexCode,
|
||||
|
|
@ -125,5 +125,5 @@ Shader* Shader::create(
|
|||
"shader program linking failed:\n"+std::string(infoLog)
|
||||
);
|
||||
}
|
||||
return new Shader(id);
|
||||
return std::make_unique<Shader>(id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue