aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/pugl_window_demo.c5
-rw-r--r--examples/rects.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/pugl_window_demo.c b/examples/pugl_window_demo.c
index b406416..9343c9c 100644
--- a/examples/pugl_window_demo.c
+++ b/examples/pugl_window_demo.c
@@ -49,6 +49,8 @@ typedef struct {
bool verbose;
} PuglTestApp;
+static const double pad = 64.0;
+
static void
onDisplay(PuglView* view)
{
@@ -200,10 +202,9 @@ main(int argc, char** argv)
puglSetClassName(app.world, "Pugl Test");
PuglStatus st = PUGL_SUCCESS;
- for (size_t i = 0; i < 2; ++i) {
+ for (unsigned i = 0; i < 2; ++i) {
CubeView* cube = &app.cubes[i];
PuglView* view = cube->view;
- static const double pad = 64.0;
const PuglRect frame = {pad + (128.0 + pad) * i,
pad + (128.0 + pad) * i,
512.0,
diff --git a/examples/rects.h b/examples/rects.h
index 0a7e5fa..f760226 100644
--- a/examples/rects.h
+++ b/examples/rects.h
@@ -70,7 +70,7 @@ moveRect(Rect* const rect,
const float frameHeight,
const double time)
{
- const float normal = index / (float)numRects;
+ const float normal = (float)index / (float)numRects;
const float offset[2] = {normal * 128.0f, normal * 128.0f};
rect->pos[0] = (frameWidth - rect->size[0] + offset[0]) *