diff options
author | David Robillard <d@drobilla.net> | 2023-01-08 19:44:41 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-08 22:32:09 -0500 |
commit | 426222903151173637c9a49246c182e79618bf83 (patch) | |
tree | 536914cb50c2e6e32f32190d2e3b7c997cb01ca7 /src/internal.c | |
parent | f1524acbd3e708d1764b7f1533d707b22254ae95 (diff) | |
download | pugl-426222903151173637c9a49246c182e79618bf83.tar.gz pugl-426222903151173637c9a49246c182e79618bf83.tar.bz2 pugl-426222903151173637c9a49246c182e79618bf83.zip |
Use ensureHint pattern everywhere
Diffstat (limited to 'src/internal.c')
-rw-r--r-- | src/internal.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/internal.c b/src/internal.c index 5549cbc..cfb444e 100644 --- a/src/internal.c +++ b/src/internal.c @@ -12,6 +12,14 @@ #include <stdlib.h> #include <string.h> +void +puglEnsureHint(PuglView* const view, const PuglViewHint hint, const int value) +{ + if (view->hints[hint] == PUGL_DONT_CARE) { + view->hints[hint] = value; + } +} + PuglStatus puglSetBlob(PuglBlob* const dest, const void* const data, const size_t len) { |