The open source OpenXR runtime

monado: Adding IWYU pragmas

+39 -20
+4 -1
src/xrt/auxiliary/math/m_base.cpp
··· 9 9 * @author Nis Madsen <nima_zero_one@protonmail.com> 10 10 * @ingroup aux_math 11 11 */ 12 + // IWYU pragma: no_include "src/Core/DenseBase.h" 13 + // IWYU pragma: no_include "src/Core/MatrixBase.h" 12 14 13 - #include "math/m_api.h" 15 + #include "math/m_api.h" // IWYU pragma: associated 16 + 14 17 #include "math/m_eigen_interop.hpp" 15 18 #include "math/m_vec3.h" 16 19
+1 -1
src/xrt/auxiliary/math/m_filter_fifo.h
··· 9 9 10 10 #pragma once 11 11 12 - #include "xrt/xrt_defines.h" 12 + #include "xrt/xrt_defines.h" // IWYU pragma: keep 13 13 14 14 #ifdef __cplusplus 15 15 extern "C" {
+2
src/xrt/auxiliary/math/m_quatexpmap.cpp
··· 9 9 * 10 10 * Based in part on inc/osvr/Util/EigenQuatExponentialMap.h in OSVR-Core 11 11 */ 12 + // IWYU pragma: no_include "src/Core/MatrixBase.h" 12 13 13 14 #include "math/m_api.h" 14 15 #include "math/m_eigen_interop.hpp" ··· 22 23 // anonymous namespace for internal types 23 24 namespace { 24 25 template <typename Scalar> struct FourthRootMachineEps; 26 + 25 27 template <> struct FourthRootMachineEps<double> 26 28 { 27 29 /// machine epsilon is 1e-53, so fourth root is roughly 1e-13
+1 -1
src/xrt/auxiliary/ogl/egl_api.h
··· 9 9 10 10 #pragma once 11 11 12 - #include "glad/egl.h" 12 + #include "glad/egl.h" // IWYU pragma: export
+1 -1
src/xrt/auxiliary/ogl/ogl_api.h
··· 9 9 10 10 #pragma once 11 11 12 - #include "glad/gl.h" 12 + #include "glad/gl.h" // IWYU pragma: export
+1 -1
src/xrt/auxiliary/ogl/ogl_helpers.c
··· 11 11 #include "util/u_logging.h" 12 12 13 13 #include "ogl_helpers.h" 14 - #include "ogl_api.h" 14 + #include "ogl_api.h" // IWYU pragma: keep 15 15 16 16 #include <inttypes.h> 17 17
+1
src/xrt/auxiliary/tracking/t_imu.cpp
··· 7 7 * @author Ryan Pavlik <ryan.pavlik@collabora.com> 8 8 * @ingroup aux_tracking 9 9 */ 10 + // IWYU pragma: no_include "src/Core/MatrixBase.h" 10 11 11 12 #include "tracking/t_imu.h" 12 13 #include "tracking/t_imu_fusion.hpp"
+1 -1
src/xrt/auxiliary/util/u_json.h
··· 13 13 #include "xrt/xrt_compiler.h" 14 14 #include "xrt/xrt_defines.h" 15 15 16 - #include "cjson/cJSON.h" 16 + #include <cjson/cJSON.h> // IWYU pragma: export 17 17 18 18 19 19 #ifdef __cplusplus
+1 -1
src/xrt/auxiliary/util/u_misc.h
··· 10 10 #pragma once 11 11 12 12 #include <stdlib.h> // for calloc 13 - #include <string.h> // for memset 13 + #include <string.h> // for memset // IWYU pragma: keep 14 14 15 15 #ifdef __cplusplus 16 16 extern "C" {
+3
src/xrt/auxiliary/util/u_template_historybuf_const_iterator.inl
··· 7 7 * @author Ryan Pavlik <ryan.pavlik@collabora.com> 8 8 * @ingroup aux_util 9 9 */ 10 + #pragma once 11 + 12 + // IWYU pragma: private, include "util/u_template_historybuf.hpp" 10 13 11 14 #include <stddef.h> 12 15 #include <type_traits>
+2
src/xrt/auxiliary/util/u_template_historybuf_impl_helpers.hpp
··· 12 12 13 13 #pragma once 14 14 15 + // IWYU pragma: private, include "util/u_template_historybuf.hpp" 16 + 15 17 #include <algorithm> 16 18 #include <assert.h> 17 19 #include <stdlib.h>
+3
src/xrt/auxiliary/util/u_template_historybuf_iterator.inl
··· 7 7 * @author Ryan Pavlik <ryan.pavlik@collabora.com> 8 8 * @ingroup aux_util 9 9 */ 10 + #pragma once 11 + 12 + // IWYU pragma: private, include "util/u_template_historybuf.hpp" 10 13 11 14 #include <stddef.h> 12 15 #include <type_traits>
+1 -1
src/xrt/auxiliary/util/u_time.h
··· 20 20 #include "xrt/xrt_compiler.h" 21 21 22 22 #include <stdint.h> 23 - #include <time.h> 23 + #include <time.h> // IWYU pragma: keep 24 24 25 25 #if defined(XRT_ENV_MINGW) 26 26 // That define is needed before to include windows.h, to avoid a collision
+1 -1
src/xrt/auxiliary/util/u_trace_marker.h
··· 12 12 #include "xrt/xrt_compiler.h" 13 13 #include "xrt/xrt_config_os.h" 14 14 #include "xrt/xrt_config_have.h" 15 - #include "xrt/xrt_config_build.h" 15 + #include "xrt/xrt_config_build.h" // IWYU pragma: keep 16 16 17 17 #include <stdio.h> 18 18
+1 -1
src/xrt/auxiliary/util/u_var.h
··· 9 9 10 10 #pragma once 11 11 12 - #include "xrt/xrt_defines.h" 12 + #include "xrt/xrt_defines.h" // IWYU pragma: keep 13 13 14 14 #include "util/u_logging.h" 15 15
+2 -1
src/xrt/drivers/vf/vf_driver.c
··· 9 9 * @ingroup drv_vf 10 10 */ 11 11 12 + #include "vf_interface.h" // IWYU pragma: associated 13 + 12 14 #include "os/os_time.h" 13 15 #include "os/os_threading.h" 14 16 ··· 21 23 #include "util/u_logging.h" 22 24 #include "util/u_trace_marker.h" 23 25 24 - #include "vf_interface.h" 25 26 26 27 #include <stdio.h> 27 28 #include <assert.h>
+2
src/xrt/drivers/vive/vive_lighthouse.c
··· 7 7 * @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com> 8 8 * @ingroup drv_vive 9 9 */ 10 + // IWYU pragma: no_include <asm/int-ll64.h> 11 + // IWYU pragma: no_include <linux/byteorder/little_endian.h> 10 12 11 13 #include <asm/byteorder.h> 12 14 #include <stdint.h>
+3 -3
src/xrt/include/xrt/xrt_openxr_includes.h
··· 46 46 #include <time.h> 47 47 #endif 48 48 49 - #include "openxr/openxr.h" 50 - #include "openxr/openxr_platform.h" 51 - #include "openxr/loader_interfaces.h" 49 + #include "openxr/openxr.h" // IWYU pragma: export 50 + #include "openxr/openxr_platform.h" // IWYU pragma: export 51 + #include "openxr/loader_interfaces.h" // IWYU pragma: export 52 52 53 53 #include "openxr/XR_MNDX_hydra.h" 54 54 #include "openxr/XR_MNDX_system_buttons.h"
+1 -1
src/xrt/include/xrt/xrt_vulkan_includes.h
··· 18 18 #include "xrt/xrt_windows.h" 19 19 20 20 #define VK_NO_PROTOTYPES 21 - #include <vulkan/vulkan.h> 21 + #include <vulkan/vulkan.h> // IWYU pragma: export 22 22 23 23 // Dealing with underscore compat. 24 24 #ifndef VK_KHR_MAINTENANCE_1_EXTENSION_NAME
+1 -1
src/xrt/state_trackers/oxr/oxr_api_space.c
··· 12 12 #include "util/u_debug.h" 13 13 #include "util/u_trace_marker.h" 14 14 15 - #include "math/m_api.h" 15 + #include "math/m_api.h" // IWYU pragma: keep 16 16 17 17 #include "oxr_objects.h" 18 18 #include "oxr_logger.h"
+6 -4
src/xrt/state_trackers/oxr/oxr_session.c
··· 10 10 */ 11 11 12 12 #include "xrt/xrt_device.h" 13 - #include "xrt/xrt_config_build.h" 14 - #include "xrt/xrt_config_have.h" 13 + #include "xrt/xrt_config_build.h" // IWYU pragma: keep 14 + #include "xrt/xrt_config_have.h" // IWYU pragma: keep 15 15 16 16 #ifdef XR_USE_PLATFORM_XLIB 17 - #include "xrt/xrt_gfx_xlib.h" 17 + #include "xrt/xrt_gfx_xlib.h" // IWYU pragma: keep 18 + 18 19 #endif // XR_USE_PLATFORM_XLIB 19 20 20 21 #ifdef XRT_HAVE_VULKAN 21 - #include "xrt/xrt_gfx_vk.h" 22 + #include "xrt/xrt_gfx_vk.h" // IWYU pragma: keep 23 + 22 24 #endif // XRT_HAVE_VULKAN 23 25 24 26 #include "os/os_time.h"