-
Undefine Bool after the headers that define them · 2490b1aeNicolas Capens authored
X11/Xlib.h defines Bool as a macro, which clashes with Reactor's Bool class. This X11 header is also included by vulkan.h, vk_icd.h, and EGL/eglplatform.h Previously we undefined Bool in various places. It's not possible to just undefine it in Reactor.hpp because one can have headers following the inclusion of Reactor.hpp which redefine it (note our convention is to include platform headers after project headers). Since X11 is only needed in select places related to the windowing system, we can instead avoid the use of these headers in other headers, and only include them in .cpp files where necessary. Note that vulkan_core.h contains the whole plaform-independent Vulkan API, so it should be used instead of vulkan.h for all non-WSI code. Bug: b/127920555 Change-Id: Id11a1c58b87802fe9e530387831693e44accae2b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/46368 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
2490b1ae
×