shaderbuilder: Insert newlines directly after defines

Instead of doing that in the loop in the last interation, we can just do
it after the loop.
This commit is contained in:
Timm Bäder 2018-03-29 18:16:58 +02:00
parent f6330846c9
commit 809fdaa3e4

View File

@ -172,11 +172,10 @@ gsk_shader_builder_compile_shader (GskShaderBuilder *builder,
g_string_append_c (code, ' ');
g_string_append (code, value);
g_string_append_c (code, '\n');
if (i == builder->defines->len - 2)
g_string_append_c (code, '\n');
}
g_string_append_c (code, '\n');
if (!lookup_shader_code (code, builder->resource_base_path, shader_preamble, error))
{
return -1;