1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 17:16:44 +00:00

Switches to std::make_shared/make_unique in a bunch of applicable places.

No doubt many more similar improvements are available, these are just the ones that were easy to find.
This commit is contained in:
Thomas Harte
2019-12-21 23:34:25 -05:00
parent 25da5ebdae
commit e9318efeb6
8 changed files with 16 additions and 17 deletions
+6 -6
View File
@@ -470,11 +470,11 @@ std::unique_ptr<Shader> ScanTarget::conversion_shader() const {
"fragColour = vec4(fragColour3, 0.64);"
"}";
return std::unique_ptr<Shader>(new Shader(
return std::make_unique<Shader>(
vertex_shader,
fragment_shader,
bindings(ShaderType::Conversion)
));
);
}
std::unique_ptr<Shader> ScanTarget::composition_shader() const {
@@ -544,11 +544,11 @@ std::unique_ptr<Shader> ScanTarget::composition_shader() const {
break;
}
return std::unique_ptr<Shader>(new Shader(
return std::make_unique<Shader>(
vertex_shader,
fragment_shader + "}",
bindings(ShaderType::Composition)
));
);
}
std::unique_ptr<Shader> ScanTarget::qam_separation_shader() const {
@@ -656,9 +656,9 @@ std::unique_ptr<Shader> ScanTarget::qam_separation_shader() const {
"fragColour = fragColour*0.5 + vec4(0.5);"
"}";
return std::unique_ptr<Shader>(new Shader(
return std::make_unique<Shader>(
vertex_shader,
fragment_shader,
bindings(ShaderType::QAMSeparation)
));
);
}