Merge pull request #100937 from Repiteo/style/clang-format-sync

Style: Enforce `AllowShortFunctionsOnASingleLine`
This commit is contained in:
Rémi Verschelde
2025-01-03 00:49:44 +01:00
16 changed files with 614 additions and 405 deletions
+12 -8
View File
@@ -70,12 +70,14 @@
// These types can be used in Vector and other containers that use
// pointer operations not supported by ARC.
namespace MTL {
#define MTL_CLASS(name) \
class name { \
public: \
name(id<MTL##name> obj = nil) : m_obj(obj) {} \
operator id<MTL##name>() const { return m_obj; } \
id<MTL##name> m_obj; \
#define MTL_CLASS(name) \
class name { \
public: \
name(id<MTL##name> obj = nil) : m_obj(obj) {} \
operator id<MTL##name>() const { \
return m_obj; \
} \
id<MTL##name> m_obj; \
};
MTL_CLASS(Texture)
@@ -949,8 +951,10 @@ void *owned(id p_id) {
return (__bridge_retained void *)p_id;
}
#define MAKE_ID(FROM, TO) \
_FORCE_INLINE_ TO make(FROM p_obj) { return TO(owned(p_obj)); }
#define MAKE_ID(FROM, TO) \
_FORCE_INLINE_ TO make(FROM p_obj) { \
return TO(owned(p_obj)); \
}
MAKE_ID(id<MTLTexture>, RDD::TextureID)
MAKE_ID(id<MTLBuffer>, RDD::BufferID)
+6 -2
View File
@@ -53,11 +53,15 @@ void clear(Tv &p_value, Tm p_mask) {
/*! Returns whether the specified value has any of the bits specified in mask set to 1. */
template <typename Tv, typename Tm>
static constexpr bool any(Tv p_value, const Tm p_mask) { return ((p_value & p_mask) != 0); }
static constexpr bool any(Tv p_value, const Tm p_mask) {
return ((p_value & p_mask) != 0);
}
/*! Returns whether the specified value has all of the bits specified in mask set to 1. */
template <typename Tv, typename Tm>
static constexpr bool all(Tv p_value, const Tm p_mask) { return ((p_value & p_mask) == p_mask); }
static constexpr bool all(Tv p_value, const Tm p_mask) {
return ((p_value & p_mask) == p_mask);
}
} //namespace flags