Skip to content

Commit

Permalink
Maybe make MSVC happy with the StructDescs
Browse files Browse the repository at this point in the history
  • Loading branch information
rj45 committed Jun 8, 2024
1 parent f4d9196 commit 5e4f74a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/core/structdescs.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "core/structs.h"

const StructDesc helperDescs[3] = {
(StructDesc){
{
.name = "HMM_Vec2",
.size = 8,
.numFields = 2,
Expand All @@ -38,7 +38,7 @@ const StructDesc helperDescs[3] = {
"float",
},
},
(StructDesc){
{
.name = "Box",
.size = 16,
.numFields = 2,
Expand All @@ -57,7 +57,7 @@ const StructDesc helperDescs[3] = {
"HMM_Vec2",
},
},
(StructDesc){
{
.name = "Wire",
.size = 2,
.numFields = 1,
Expand All @@ -77,7 +77,7 @@ const StructDesc helperDescs[3] = {
};

const StructDesc structDescs[7] = {
(StructDesc){
{
.name = "None",
.size = 4,
.numFields = 1,
Expand All @@ -94,7 +94,7 @@ const StructDesc structDescs[7] = {
"uint32_t",
},
},
(StructDesc){
{
.name = "Component",
.size = 36,
.numFields = 6,
Expand All @@ -121,7 +121,7 @@ const StructDesc structDescs[7] = {
"LabelID",
},
},
(StructDesc){
{
.name = "Port",
.size = 36,
.numFields = 8,
Expand Down Expand Up @@ -152,7 +152,7 @@ const StructDesc structDescs[7] = {
"EndpointID",
},
},
(StructDesc){
{
.name = "Net",
.size = 32,
.numFields = 8,
Expand Down Expand Up @@ -183,7 +183,7 @@ const StructDesc structDescs[7] = {
"VertexIndex",
},
},
(StructDesc){
{
.name = "Endpoint",
.size = 24,
.numFields = 5,
Expand All @@ -208,7 +208,7 @@ const StructDesc structDescs[7] = {
"EndpointID",
},
},
(StructDesc){
{
.name = "Waypoint",
.size = 20,
.numFields = 4,
Expand All @@ -231,7 +231,7 @@ const StructDesc structDescs[7] = {
"WaypointID",
},
},
(StructDesc){
{
.name = "Label",
.size = 20,
.numFields = 2,
Expand Down
2 changes: 1 addition & 1 deletion src/gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ int main(int argc, char **argv) {
fprintf(fp, "const StructDesc %s[%lu] = {\n", name, num);
for (int i = 0; i < num; i++) {
const StructDesc *desc = &descs[i];
fprintf(fp, " (StructDesc){\n");
fprintf(fp, " {\n");
fprintf(fp, " .name = \"%s\",\n", desc->name);
fprintf(fp, " .size = %zu,\n", desc->size);
fprintf(fp, " .numFields = %lu,\n", desc->numFields);
Expand Down

0 comments on commit 5e4f74a

Please sign in to comment.