1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-02 20:30:00 +00:00

Initialize all const members.

Without this change, GCC versions >4.8 will error with things like:

```
./CLK/Outputs/CRT/Internals/CRTOpenGL.cpp:154:2:error: uninitialized const member
'Outputs::CRT::OpenGLOutputBuilder::draw_frame(unsigned int, unsigned int, bool)::RenderStage::target'
```
This commit is contained in:
Matt Godbolt 2017-11-24 12:09:10 -06:00
parent 85085a6375
commit bded406caa
3 changed files with 4 additions and 4 deletions

View File

@ -150,14 +150,14 @@ void OpenGLOutputBuilder::draw_frame(unsigned int output_width, unsigned int out
{composite_input_shader_program_.get(), composite_texture_.get(), {0.0, 0.0, 0.0}},
{composite_separation_filter_program_.get(), separated_texture_.get(), {0.0, 0.5, 0.5}},
{composite_chrominance_filter_shader_program_.get(), filtered_texture_.get(), {0.0, 0.0, 0.0}},
{nullptr}
{nullptr, nullptr}
};
// for RGB video, there's only two steps
RenderStage rgb_render_stages[] = {
{rgb_input_shader_program_.get(), composite_texture_.get(), {0.0, 0.0, 0.0}},
{rgb_filter_shader_program_.get(), filtered_texture_.get(), {0.0, 0.0, 0.0}},
{nullptr}
{nullptr, nullptr}
};
RenderStage *active_pipeline = get_is_television_output() ? composite_render_stages : rgb_render_stages;

View File

@ -21,7 +21,7 @@ namespace {
{"outputStart", 1},
{"ends", 2},
{"phaseTimeAndAmplitude", 3},
{nullptr}
{nullptr, 0}
};
}

View File

@ -17,7 +17,7 @@ namespace {
const OpenGL::Shader::AttributeBinding bindings[] = {
{"position", 0},
{"srcCoordinates", 1},
{nullptr}
{nullptr, 0}
};
}