diff options
author | David Robillard <d@drobilla.net> | 2020-07-05 15:01:17 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-05 18:47:39 +0200 |
commit | d70aa80d71299c24ebd71537cfd620eff2b7e50d (patch) | |
tree | 2b1606491ac1f7c6a4063549fb81f5597d0b3750 /examples | |
parent | abf44b129480937cd31d6585183d266a496ee2a4 (diff) | |
download | pugl-d70aa80d71299c24ebd71537cfd620eff2b7e50d.tar.gz pugl-d70aa80d71299c24ebd71537cfd620eff2b7e50d.tar.bz2 pugl-d70aa80d71299c24ebd71537cfd620eff2b7e50d.zip |
Improve struct packing
Unfortunately there is no warning like Wpadded but only for internal padding,
so that can't be turned on, but if there was, after this commit the build would
be clean with it. Maybe some day...
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pugl_cairo_demo.c | 2 | ||||
-rw-r--r-- | examples/pugl_cursor_demo.c | 2 | ||||
-rw-r--r-- | examples/pugl_embed_demo.c | 6 | ||||
-rw-r--r-- | examples/pugl_shader_demo.c | 2 | ||||
-rw-r--r-- | examples/pugl_window_demo.c | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/examples/pugl_cairo_demo.c b/examples/pugl_cairo_demo.c index 2e0b9c7..5fe0661 100644 --- a/examples/pugl_cairo_demo.c +++ b/examples/pugl_cairo_demo.c @@ -33,8 +33,8 @@ #include <string.h> typedef struct { - PuglTestOptions opts; PuglWorld* world; + PuglTestOptions opts; unsigned framesDrawn; int quit; bool entered; diff --git a/examples/pugl_cursor_demo.c b/examples/pugl_cursor_demo.c index 244d22f..03ab5da 100644 --- a/examples/pugl_cursor_demo.c +++ b/examples/pugl_cursor_demo.c @@ -32,8 +32,8 @@ static const int N_ROWS = 2; static const int N_COLS = 4; typedef struct { - PuglTestOptions opts; PuglWorld* world; + PuglTestOptions opts; bool quit; } PuglTestApp; diff --git a/examples/pugl_embed_demo.c b/examples/pugl_embed_demo.c index e21dd55..774ac77 100644 --- a/examples/pugl_embed_demo.c +++ b/examples/pugl_embed_demo.c @@ -41,14 +41,14 @@ typedef struct PuglWorld* world; PuglView* parent; PuglView* child; - bool continuous; - int quit; double xAngle; double yAngle; - float dist; double lastMouseX; double lastMouseY; double lastDrawTime; + float dist; + int quit; + bool continuous; bool mouseEntered; bool verbose; bool reversing; diff --git a/examples/pugl_shader_demo.c b/examples/pugl_shader_demo.c index 15e1943..50afb37 100644 --- a/examples/pugl_shader_demo.c +++ b/examples/pugl_shader_demo.c @@ -61,9 +61,9 @@ typedef struct typedef struct { - PuglTestOptions opts; PuglWorld* world; PuglView* view; + PuglTestOptions opts; size_t numRects; Rect* rects; Program drawRect; diff --git a/examples/pugl_window_demo.c b/examples/pugl_window_demo.c index 9343c9c..f326f21 100644 --- a/examples/pugl_window_demo.c +++ b/examples/pugl_window_demo.c @@ -34,18 +34,18 @@ typedef struct { PuglView* view; double xAngle; double yAngle; - float dist; double lastMouseX; double lastMouseY; double lastDrawTime; + float dist; bool entered; } CubeView; typedef struct { PuglWorld* world; CubeView cubes[2]; - bool continuous; int quit; + bool continuous; bool verbose; } PuglTestApp; |