Style: Declare inline macros as attributes
This commit is contained in:
parent
09ea7bc6a3
commit
dd5460c32a
@ -52,8 +52,10 @@ AllowShortFunctionsOnASingleLine: Inline
|
||||
# AlwaysBreakAfterReturnType: None
|
||||
# AlwaysBreakBeforeMultilineStrings: false
|
||||
# AlwaysBreakTemplateDeclarations: MultiLine
|
||||
# AttributeMacros:
|
||||
# - __capability
|
||||
AttributeMacros:
|
||||
- _ALWAYS_INLINE_
|
||||
- _FORCE_INLINE_
|
||||
- _NO_INLINE_
|
||||
# BinPackArguments: true
|
||||
# BinPackParameters: true
|
||||
# BitFieldColonSpacing: Both
|
||||
|
@ -945,8 +945,7 @@ namespace rid {
|
||||
|
||||
// Converts an Objective-C object to a pointer, and incrementing the
|
||||
// reference count.
|
||||
_FORCE_INLINE_
|
||||
void *owned(id p_id) {
|
||||
_FORCE_INLINE_ void *owned(id p_id) {
|
||||
return (__bridge_retained void *)p_id;
|
||||
}
|
||||
|
||||
@ -962,14 +961,12 @@ MAKE_ID(MTLVertexDescriptor *, RDD::VertexFormatID)
|
||||
MAKE_ID(id<MTLCommandQueue>, RDD::CommandPoolID)
|
||||
|
||||
// Converts a pointer to an Objective-C object without changing the reference count.
|
||||
_FORCE_INLINE_
|
||||
auto get(RDD::ID p_id) {
|
||||
_FORCE_INLINE_ auto get(RDD::ID p_id) {
|
||||
return (p_id.id) ? (__bridge ::id)(void *)p_id.id : nil;
|
||||
}
|
||||
|
||||
// Converts a pointer to an Objective-C object, and decrements the reference count.
|
||||
_FORCE_INLINE_
|
||||
auto release(RDD::ID p_id) {
|
||||
_FORCE_INLINE_ auto release(RDD::ID p_id) {
|
||||
return (__bridge_transfer ::id)(void *)p_id.id;
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,10 @@ AlignTrailingComments:
|
||||
OverEmptyLines: 0
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AttributeMacros:
|
||||
- _ALWAYS_INLINE_
|
||||
- _FORCE_INLINE_
|
||||
- _NO_INLINE_
|
||||
BreakConstructorInitializers: AfterColon
|
||||
ColumnLimit: 0
|
||||
ConstructorInitializerIndentWidth: 8
|
||||
|
@ -3,7 +3,7 @@
|
||||
#[modes]
|
||||
|
||||
mode_ninepatch = #define USE_NINEPATCH
|
||||
|
||||
/* clang-format off */
|
||||
#[specializations]
|
||||
|
||||
DISABLE_LIGHTING = false
|
||||
@ -12,7 +12,7 @@ DISABLE_LIGHTING = false
|
||||
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
|
||||
/* clang-format on */
|
||||
layout(location = 0) in highp vec3 vertex;
|
||||
|
||||
out highp vec4 position_interp;
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#VERSION_DEFINES
|
||||
|
||||
|
||||
#include "_included.glsl"
|
||||
|
||||
void main() {
|
||||
|
@ -11,7 +11,6 @@ lines = "#define MODE_LINES";
|
||||
layout(location = 0) out vec3 uv_interp;
|
||||
|
||||
void main() {
|
||||
|
||||
#ifdef MODE_LINES
|
||||
uv_interp = vec3(0, 0, 1);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user