diff options
author | Colin Basnett <cmbasnett@gmail.com> | 2022-09-17 03:50:37 +0300 |
---|---|---|
committer | Colin Basnett <cmbasnett@gmail.com> | 2022-09-17 03:50:37 +0300 |
commit | 564bda241a973396da51d7c3ccd9efd97d51728a (patch) | |
tree | 4d9aa4cccd82e2e606b47774afa5e1015bf14768 /intern/ghost/intern/GHOST_WaylandUtils.h | |
parent | 0fff238150d076576053c25b646f653d6e3b0edb (diff) | |
parent | 48d7ff68f0df209c77bbb081ab46fbc109fd825a (diff) |
Merge branch 'master' into feature-imformatfeature-imformat
Diffstat (limited to 'intern/ghost/intern/GHOST_WaylandUtils.h')
-rw-r--r-- | intern/ghost/intern/GHOST_WaylandUtils.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_WaylandUtils.h b/intern/ghost/intern/GHOST_WaylandUtils.h new file mode 100644 index 00000000000..0e1e133bc4c --- /dev/null +++ b/intern/ghost/intern/GHOST_WaylandUtils.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/** \file + * \ingroup GHOST + */ + +#pragma once + +#ifdef __cplusplus +# undef wl_array_for_each +/** + * This macro causes a warning for C++ code, define our own. + * See: https://gitlab.freedesktop.org/wayland/wayland/-/issues/34 + */ +# define WL_ARRAY_FOR_EACH(pos, array) \ + for (pos = (decltype(pos))((array)->data); \ + (const char *)pos < ((const char *)(array)->data + (array)->size); \ + (pos)++) +#endif |