mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 10:51:35 +00:00
dawn.h: Don't use anonymous structures
Instead make them have the same name as their typedef. This is because anonymous structures is considered bad practice in C because it prevents forward declaring them. BUG= Change-Id: I2d7a788a0d807a2689567d0bb220adaf5335e07a Reviewed-on: https://dawn-review.googlesource.com/1521 Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
3d670506e3
commit
1e68479cd6
@ -36,7 +36,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for type in by_category["structure"] %}
|
{% for type in by_category["structure"] %}
|
||||||
typedef struct {
|
typedef struct {{as_cType(type.name)}} {
|
||||||
{% if type.extensible %}
|
{% if type.extensible %}
|
||||||
const void* nextInChain;
|
const void* nextInChain;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -44,6 +44,7 @@
|
|||||||
{{as_annotated_cType(member)}};
|
{{as_annotated_cType(member)}};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
} {{as_cType(type.name)}};
|
} {{as_cType(type.name)}};
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
// Custom types depending on the target language
|
// Custom types depending on the target language
|
||||||
|
Loading…
x
Reference in New Issue
Block a user