Blender  V2.93
Macros
GHOST_Xr_intern.h File Reference
#include <memory>
#include <vector>
#include "GHOST_Xr_openxr_includes.h"

Go to the source code of this file.

Macros

#define CHECK_XR(call, error_msg)
 
#define CHECK_XR_ASSERT(call)
 

Macro Definition Documentation

◆ CHECK_XR

#define CHECK_XR (   call,
  error_msg 
)
Value:
{ \
XrResult _res = call; \
if (XR_FAILED(_res)) { \
throw GHOST_XrException(error_msg, _res); \
} \
} \
(void)0

Definition at line 28 of file GHOST_Xr_intern.h.

◆ CHECK_XR_ASSERT

#define CHECK_XR_ASSERT (   call)
Value:
{ \
XrResult _res = call; \
assert(_res == XR_SUCCESS); \
(void)_res; \
} \
(void)0

Variation of CHECK_XR() that doesn't throw, but asserts for success. Especially useful for destructors, which shouldn't throw.

Definition at line 41 of file GHOST_Xr_intern.h.