Apply clang-tidy fixes for bugprone-macro-parentheses in Interop.h (NFC)

This commit is contained in:
Mehdi Amini 2022-01-11 20:21:37 +00:00
parent ac5d32b103
commit 44bdcb889a

View file

@ -96,7 +96,8 @@
/// Gets a void* from a wrapped struct. Needed because const cast is different
/// between C/C++.
#ifdef __cplusplus
#define MLIR_PYTHON_GET_WRAPPED_POINTER(object) const_cast<void *>(object.ptr)
#define MLIR_PYTHON_GET_WRAPPED_POINTER(object) \
(const_cast<void *>((object).ptr))
#else
#define MLIR_PYTHON_GET_WRAPPED_POINTER(object) (void *)(object.ptr)
#endif