The open source OpenXR runtime

monado: Adding IWYU pragmas

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