From 426222903151173637c9a49246c182e79618bf83 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Jan 2023 19:44:41 -0500 Subject: Use ensureHint pattern everywhere --- src/internal.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/internal.c') 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 #include +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) { -- cgit v1.2.1