mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Style: Declare inline macros as attributes
This commit is contained in:
parent
09ea7bc6a3
commit
dd5460c32a
6 changed files with 16 additions and 15 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue