diff options
author | David Robillard <d@drobilla.net> | 2022-06-07 21:19:26 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-06-07 21:19:26 -0400 |
commit | 5076f59694e33d1099511d20ef72f4fc6cfa87cd (patch) | |
tree | 28717b0445b72a5031985ebb6820a7d355609abf /src/mac.m | |
parent | 6115f80dfb76ffbdeeacab5fc33ea4fb5eb677fd (diff) | |
download | pugl-5076f59694e33d1099511d20ef72f4fc6cfa87cd.tar.gz pugl-5076f59694e33d1099511d20ef72f4fc6cfa87cd.tar.bz2 pugl-5076f59694e33d1099511d20ef72f4fc6cfa87cd.zip |
Use a consistent scheme for enum sizes
Diffstat (limited to 'src/mac.m')
-rw-r--r-- | src/mac.m | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -998,7 +998,7 @@ updateSizeHint(PuglView* const view, const PuglSizeHint hint) static void updateSizeHints(PuglView* const view) { - for (unsigned i = 0u; i <= PUGL_MAX_ASPECT; ++i) { + for (unsigned i = 0u; i < PUGL_NUM_SIZE_HINTS; ++i) { updateSizeHint(view, (PuglSizeHint)i); } } @@ -1542,7 +1542,7 @@ puglSetSizeHint(PuglView* const view, const PuglSpan width, const PuglSpan height) { - if ((unsigned)hint > (unsigned)PUGL_MAX_ASPECT) { + if ((unsigned)hint >= PUGL_NUM_SIZE_HINTS) { return PUGL_BAD_PARAMETER; } |