monado: Adding IWYU pragmas

This commit is contained in:
Rylie Pavlik 2023-11-15 12:16:55 -06:00
parent 0ac6fdae94
commit 9a4bc4d9c7
21 changed files with 39 additions and 20 deletions

View file

@ -9,8 +9,11 @@
* @author Nis Madsen <nima_zero_one@protonmail.com>
* @ingroup aux_math
*/
// IWYU pragma: no_include "src/Core/DenseBase.h"
// IWYU pragma: no_include "src/Core/MatrixBase.h"
#include "math/m_api.h" // IWYU pragma: associated
#include "math/m_api.h"
#include "math/m_eigen_interop.hpp"
#include "math/m_vec3.h"

View file

@ -9,7 +9,7 @@
#pragma once
#include "xrt/xrt_defines.h"
#include "xrt/xrt_defines.h" // IWYU pragma: keep
#ifdef __cplusplus
extern "C" {

View file

@ -9,6 +9,7 @@
*
* Based in part on inc/osvr/Util/EigenQuatExponentialMap.h in OSVR-Core
*/
// IWYU pragma: no_include "src/Core/MatrixBase.h"
#include "math/m_api.h"
#include "math/m_eigen_interop.hpp"
@ -22,6 +23,7 @@
// anonymous namespace for internal types
namespace {
template <typename Scalar> struct FourthRootMachineEps;
template <> struct FourthRootMachineEps<double>
{
/// machine epsilon is 1e-53, so fourth root is roughly 1e-13

View file

@ -9,4 +9,4 @@
#pragma once
#include "glad/egl.h"
#include "glad/egl.h" // IWYU pragma: export

View file

@ -9,4 +9,4 @@
#pragma once
#include "glad/gl.h"
#include "glad/gl.h" // IWYU pragma: export

View file

@ -11,7 +11,7 @@
#include "util/u_logging.h"
#include "ogl_helpers.h"
#include "ogl_api.h"
#include "ogl_api.h" // IWYU pragma: keep
#include <inttypes.h>

View file

@ -7,6 +7,7 @@
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
* @ingroup aux_tracking
*/
// IWYU pragma: no_include "src/Core/MatrixBase.h"
#include "tracking/t_imu.h"
#include "tracking/t_imu_fusion.hpp"

View file

@ -13,7 +13,7 @@
#include "xrt/xrt_compiler.h"
#include "xrt/xrt_defines.h"
#include "cjson/cJSON.h"
#include <cjson/cJSON.h> // IWYU pragma: export
#ifdef __cplusplus

View file

@ -10,7 +10,7 @@
#pragma once
#include <stdlib.h> // for calloc
#include <string.h> // for memset
#include <string.h> // for memset // IWYU pragma: keep
#ifdef __cplusplus
extern "C" {

View file

@ -7,6 +7,9 @@
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
* @ingroup aux_util
*/
#pragma once
// IWYU pragma: private, include "util/u_template_historybuf.hpp"
#include <stddef.h>
#include <type_traits>

View file

@ -12,6 +12,8 @@
#pragma once
// IWYU pragma: private, include "util/u_template_historybuf.hpp"
#include <algorithm>
#include <assert.h>
#include <stdlib.h>

View file

@ -7,6 +7,9 @@
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
* @ingroup aux_util
*/
#pragma once
// IWYU pragma: private, include "util/u_template_historybuf.hpp"
#include <stddef.h>
#include <type_traits>

View file

@ -20,7 +20,7 @@
#include "xrt/xrt_compiler.h"
#include <stdint.h>
#include <time.h>
#include <time.h> // IWYU pragma: keep
#if defined(XRT_ENV_MINGW)
// That define is needed before to include windows.h, to avoid a collision

View file

@ -12,7 +12,7 @@
#include "xrt/xrt_compiler.h"
#include "xrt/xrt_config_os.h"
#include "xrt/xrt_config_have.h"
#include "xrt/xrt_config_build.h"
#include "xrt/xrt_config_build.h" // IWYU pragma: keep
#include <stdio.h>

View file

@ -9,7 +9,7 @@
#pragma once
#include "xrt/xrt_defines.h"
#include "xrt/xrt_defines.h" // IWYU pragma: keep
#include "util/u_logging.h"

View file

@ -9,6 +9,8 @@
* @ingroup drv_vf
*/
#include "vf_interface.h" // IWYU pragma: associated
#include "os/os_time.h"
#include "os/os_threading.h"
@ -21,7 +23,6 @@
#include "util/u_logging.h"
#include "util/u_trace_marker.h"
#include "vf_interface.h"
#include <stdio.h>
#include <assert.h>

View file

@ -7,6 +7,8 @@
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @ingroup drv_vive
*/
// IWYU pragma: no_include <asm/int-ll64.h>
// IWYU pragma: no_include <linux/byteorder/little_endian.h>
#include <asm/byteorder.h>
#include <stdint.h>

View file

@ -46,9 +46,9 @@ typedef __eglMustCastToProperFunctionPointerType (*PFNEGLGETPROCADDRESSPROC)(con
#include <time.h>
#endif
#include "openxr/openxr.h"
#include "openxr/openxr_platform.h"
#include "openxr/loader_interfaces.h"
#include "openxr/openxr.h" // IWYU pragma: export
#include "openxr/openxr_platform.h" // IWYU pragma: export
#include "openxr/loader_interfaces.h" // IWYU pragma: export
#include "openxr/XR_MNDX_hydra.h"
#include "openxr/XR_MNDX_system_buttons.h"

View file

@ -18,7 +18,7 @@
#include "xrt/xrt_windows.h"
#define VK_NO_PROTOTYPES
#include <vulkan/vulkan.h>
#include <vulkan/vulkan.h> // IWYU pragma: export
// Dealing with underscore compat.
#ifndef VK_KHR_MAINTENANCE_1_EXTENSION_NAME

View file

@ -12,7 +12,7 @@
#include "util/u_debug.h"
#include "util/u_trace_marker.h"
#include "math/m_api.h"
#include "math/m_api.h" // IWYU pragma: keep
#include "oxr_objects.h"
#include "oxr_logger.h"

View file

@ -10,15 +10,17 @@
*/
#include "xrt/xrt_device.h"
#include "xrt/xrt_config_build.h"
#include "xrt/xrt_config_have.h"
#include "xrt/xrt_config_build.h" // IWYU pragma: keep
#include "xrt/xrt_config_have.h" // IWYU pragma: keep
#ifdef XR_USE_PLATFORM_XLIB
#include "xrt/xrt_gfx_xlib.h"
#include "xrt/xrt_gfx_xlib.h" // IWYU pragma: keep
#endif // XR_USE_PLATFORM_XLIB
#ifdef XRT_HAVE_VULKAN
#include "xrt/xrt_gfx_vk.h"
#include "xrt/xrt_gfx_vk.h" // IWYU pragma: keep
#endif // XRT_HAVE_VULKAN
#include "os/os_time.h"