Fix "This block and function declaration is not a prototype" warning. (#619)

This commit is contained in:
Mustafa Besnili 2017-10-17 16:18:23 +03:00 committed by Huy Nguyen
parent 72d33fc88e
commit 1e7d46196f
17 changed files with 48 additions and 48 deletions

View File

@ -22,7 +22,7 @@
/** /**
* ASCellNode creation block. Used to lazily create the ASCellNode instance for a specified indexPath. * ASCellNode creation block. Used to lazily create the ASCellNode instance for a specified indexPath.
*/ */
typedef ASCellNode * _Nonnull(^ASCellNodeBlock)(); typedef ASCellNode * _Nonnull(^ASCellNodeBlock)(void);
// Type for the cancellation checker block passed into the async display blocks. YES means the operation has been cancelled, NO means continue. // Type for the cancellation checker block passed into the async display blocks. YES means the operation has been cancelled, NO means continue.
typedef BOOL(^asdisplaynode_iscancelled_block_t)(void); typedef BOOL(^asdisplaynode_iscancelled_block_t)(void);

View File

@ -244,7 +244,7 @@ NS_ASSUME_NONNULL_BEGIN
* Boolean parameter that contains the value YES if all of the related animations completed successfully or * Boolean parameter that contains the value YES if all of the related animations completed successfully or
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
*/ */
- (void)performBatchAnimated:(BOOL)animated updates:(nullable AS_NOESCAPE void (^)())updates completion:(nullable void (^)(BOOL finished))completion; - (void)performBatchAnimated:(BOOL)animated updates:(nullable AS_NOESCAPE void (^)(void))updates completion:(nullable void (^)(BOOL finished))completion;
/** /**
* Perform a batch of updates asynchronously, optionally disabling all animations in the batch. This method must be called from the main thread. * Perform a batch of updates asynchronously, optionally disabling all animations in the batch. This method must be called from the main thread.
@ -255,7 +255,7 @@ NS_ASSUME_NONNULL_BEGIN
* Boolean parameter that contains the value YES if all of the related animations completed successfully or * Boolean parameter that contains the value YES if all of the related animations completed successfully or
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
*/ */
- (void)performBatchUpdates:(nullable AS_NOESCAPE void (^)())updates completion:(nullable void (^)(BOOL finished))completion; - (void)performBatchUpdates:(nullable AS_NOESCAPE void (^)(void))updates completion:(nullable void (^)(BOOL finished))completion;
/** /**
* Returns YES if the ASCollectionNode is still processing changes from performBatchUpdates:. * Returns YES if the ASCollectionNode is still processing changes from performBatchUpdates:.
@ -284,7 +284,7 @@ NS_ASSUME_NONNULL_BEGIN
* *
* Calling -waitUntilAllUpdatesAreProcessed is one way to flush any pending update completion blocks. * Calling -waitUntilAllUpdatesAreProcessed is one way to flush any pending update completion blocks.
*/ */
- (void)onDidFinishProcessingUpdates:(nullable void (^)())didFinishProcessingUpdates; - (void)onDidFinishProcessingUpdates:(nullable void (^)(void))didFinishProcessingUpdates;
/** /**
* Blocks execution of the main thread until all section and item updates are committed to the view. This method must be called from the main thread. * Blocks execution of the main thread until all section and item updates are committed to the view. This method must be called from the main thread.
@ -382,7 +382,7 @@ NS_ASSUME_NONNULL_BEGIN
* the main thread. * the main thread.
* @warning This method is substantially more expensive than UICollectionView's version. * @warning This method is substantially more expensive than UICollectionView's version.
*/ */
- (void)reloadDataWithCompletion:(nullable void (^)())completion; - (void)reloadDataWithCompletion:(nullable void (^)(void))completion;
/** /**

View File

@ -256,7 +256,7 @@ NS_ASSUME_NONNULL_BEGIN
* Boolean parameter that contains the value YES if all of the related animations completed successfully or * Boolean parameter that contains the value YES if all of the related animations completed successfully or
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
*/ */
- (void)performBatchAnimated:(BOOL)animated updates:(nullable AS_NOESCAPE void (^)())updates completion:(nullable void (^)(BOOL finished))completion ASDISPLAYNODE_DEPRECATED_MSG("Use ASCollectionNode method instead."); - (void)performBatchAnimated:(BOOL)animated updates:(nullable AS_NOESCAPE void (^)(void))updates completion:(nullable void (^)(BOOL finished))completion ASDISPLAYNODE_DEPRECATED_MSG("Use ASCollectionNode method instead.");
/** /**
* Perform a batch of updates asynchronously. This method must be called from the main thread. * Perform a batch of updates asynchronously. This method must be called from the main thread.
@ -267,7 +267,7 @@ NS_ASSUME_NONNULL_BEGIN
* Boolean parameter that contains the value YES if all of the related animations completed successfully or * Boolean parameter that contains the value YES if all of the related animations completed successfully or
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
*/ */
- (void)performBatchUpdates:(nullable AS_NOESCAPE void (^)())updates completion:(nullable void (^)(BOOL finished))completion ASDISPLAYNODE_DEPRECATED_MSG("Use ASCollectionNode method instead."); - (void)performBatchUpdates:(nullable AS_NOESCAPE void (^)(void))updates completion:(nullable void (^)(BOOL finished))completion ASDISPLAYNODE_DEPRECATED_MSG("Use ASCollectionNode method instead.");
/** /**
* Reload everything from scratch, destroying the working range and all cached nodes. * Reload everything from scratch, destroying the working range and all cached nodes.
@ -276,7 +276,7 @@ NS_ASSUME_NONNULL_BEGIN
* the main thread. * the main thread.
* @warning This method is substantially more expensive than UICollectionView's version. * @warning This method is substantially more expensive than UICollectionView's version.
*/ */
- (void)reloadDataWithCompletion:(nullable void (^)())completion AS_UNAVAILABLE("Use ASCollectionNode method instead."); - (void)reloadDataWithCompletion:(nullable void (^)(void))completion AS_UNAVAILABLE("Use ASCollectionNode method instead.");
/** /**
* Reload everything from scratch, destroying the working range and all cached nodes. * Reload everything from scratch, destroying the working range and all cached nodes.
@ -296,7 +296,7 @@ NS_ASSUME_NONNULL_BEGIN
* See ASCollectionNode.h for full documentation of these methods. * See ASCollectionNode.h for full documentation of these methods.
*/ */
@property (nonatomic, readonly) BOOL isProcessingUpdates; @property (nonatomic, readonly) BOOL isProcessingUpdates;
- (void)onDidFinishProcessingUpdates:(nullable void (^)())completion; - (void)onDidFinishProcessingUpdates:(nullable void (^)(void))completion;
- (void)waitUntilAllUpdatesAreCommitted ASDISPLAYNODE_DEPRECATED_MSG("Use -[ASCollectionNode waitUntilAllUpdatesAreProcessed] instead."); - (void)waitUntilAllUpdatesAreCommitted ASDISPLAYNODE_DEPRECATED_MSG("Use -[ASCollectionNode waitUntilAllUpdatesAreProcessed] instead.");
/** /**

View File

@ -28,8 +28,8 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
ASDISPLAYNODE_EXTERN_C_BEGIN ASDISPLAYNODE_EXTERN_C_BEGIN
void ASPerformBlockOnMainThread(void (^block)()); void ASPerformBlockOnMainThread(void (^block)(void));
void ASPerformBlockOnBackgroundThread(void (^block)()); // DISPATCH_QUEUE_PRIORITY_DEFAULT void ASPerformBlockOnBackgroundThread(void (^block)(void)); // DISPATCH_QUEUE_PRIORITY_DEFAULT
ASDISPLAYNODE_EXTERN_C_END ASDISPLAYNODE_EXTERN_C_END
#if ASEVENTLOG_ENABLE #if ASEVENTLOG_ENABLE

View File

@ -36,17 +36,17 @@ NS_ASSUME_NONNULL_BEGIN
/** /**
* UIView creation block. Used to create the backing view of a new display node. * UIView creation block. Used to create the backing view of a new display node.
*/ */
typedef UIView * _Nonnull(^ASDisplayNodeViewBlock)(); typedef UIView * _Nonnull(^ASDisplayNodeViewBlock)(void);
/** /**
* UIView creation block. Used to create the backing view of a new display node. * UIView creation block. Used to create the backing view of a new display node.
*/ */
typedef UIViewController * _Nonnull(^ASDisplayNodeViewControllerBlock)(); typedef UIViewController * _Nonnull(^ASDisplayNodeViewControllerBlock)(void);
/** /**
* CALayer creation block. Used to create the backing layer of a new display node. * CALayer creation block. Used to create the backing layer of a new display node.
*/ */
typedef CALayer * _Nonnull(^ASDisplayNodeLayerBlock)(); typedef CALayer * _Nonnull(^ASDisplayNodeLayerBlock)(void);
/** /**
* ASDisplayNode loaded callback block. This block is called BEFORE the -didLoad method and is always called on the main thread. * ASDisplayNode loaded callback block. This block is called BEFORE the -didLoad method and is always called on the main thread.
@ -880,7 +880,7 @@ extern NSInteger const ASDefaultDrawingPriority;
- (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize - (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize
animated:(BOOL)animated animated:(BOOL)animated
shouldMeasureAsync:(BOOL)shouldMeasureAsync shouldMeasureAsync:(BOOL)shouldMeasureAsync
measurementCompletion:(nullable void(^)())completion; measurementCompletion:(nullable void(^)(void))completion;
/** /**
@ -897,7 +897,7 @@ extern NSInteger const ASDefaultDrawingPriority;
*/ */
- (void)transitionLayoutWithAnimation:(BOOL)animated - (void)transitionLayoutWithAnimation:(BOOL)animated
shouldMeasureAsync:(BOOL)shouldMeasureAsync shouldMeasureAsync:(BOOL)shouldMeasureAsync
measurementCompletion:(nullable void(^)())completion; measurementCompletion:(nullable void(^)(void))completion;
/** /**
* @abstract Cancels all performing layout transitions. Can be called on any thread. * @abstract Cancels all performing layout transitions. Can be called on any thread.

View File

@ -208,8 +208,8 @@ extern __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSubnode(ASDispla
*/ */
extern __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSubnodeOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT; extern __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSubnodeOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT;
extern UIColor *ASDisplayNodeDefaultPlaceholderColor() AS_WARN_UNUSED_RESULT; extern UIColor *ASDisplayNodeDefaultPlaceholderColor(void) AS_WARN_UNUSED_RESULT;
extern UIColor *ASDisplayNodeDefaultTintColor() AS_WARN_UNUSED_RESULT; extern UIColor *ASDisplayNodeDefaultTintColor(void) AS_WARN_UNUSED_RESULT;
/** /**
Disable willAppear / didAppear / didDisappear notifications for a sub-hierarchy, then re-enable when done. Nested calls are supported. Disable willAppear / didAppear / didDisappear notifications for a sub-hierarchy, then re-enable when done. Nested calls are supported.

View File

@ -172,7 +172,7 @@ NS_ASSUME_NONNULL_BEGIN
* the main thread. * the main thread.
* @warning This method is substantially more expensive than UITableView's version. * @warning This method is substantially more expensive than UITableView's version.
*/ */
- (void)reloadDataWithCompletion:(nullable void (^)())completion; - (void)reloadDataWithCompletion:(nullable void (^)(void))completion;
/** /**
* Reload everything from scratch, destroying the working range and all cached nodes. * Reload everything from scratch, destroying the working range and all cached nodes.
@ -198,7 +198,7 @@ NS_ASSUME_NONNULL_BEGIN
* Boolean parameter that contains the value YES if all of the related animations completed successfully or * Boolean parameter that contains the value YES if all of the related animations completed successfully or
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
*/ */
- (void)performBatchAnimated:(BOOL)animated updates:(nullable AS_NOESCAPE void (^)())updates completion:(nullable void (^)(BOOL finished))completion; - (void)performBatchAnimated:(BOOL)animated updates:(nullable AS_NOESCAPE void (^)(void))updates completion:(nullable void (^)(BOOL finished))completion;
/** /**
* Perform a batch of updates asynchronously with animations in the batch. This method must be called from the main thread. * Perform a batch of updates asynchronously with animations in the batch. This method must be called from the main thread.
@ -209,7 +209,7 @@ NS_ASSUME_NONNULL_BEGIN
* Boolean parameter that contains the value YES if all of the related animations completed successfully or * Boolean parameter that contains the value YES if all of the related animations completed successfully or
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
*/ */
- (void)performBatchUpdates:(nullable AS_NOESCAPE void (^)())updates completion:(nullable void (^)(BOOL finished))completion; - (void)performBatchUpdates:(nullable AS_NOESCAPE void (^)(void))updates completion:(nullable void (^)(BOOL finished))completion;
/** /**
* Returns YES if the ASCollectionNode is still processing changes from performBatchUpdates:. * Returns YES if the ASCollectionNode is still processing changes from performBatchUpdates:.
@ -238,7 +238,7 @@ NS_ASSUME_NONNULL_BEGIN
* *
* Calling -waitUntilAllUpdatesAreProcessed is one way to flush any pending update completion blocks. * Calling -waitUntilAllUpdatesAreProcessed is one way to flush any pending update completion blocks.
*/ */
- (void)onDidFinishProcessingUpdates:(nullable void (^)())didFinishProcessingUpdates; - (void)onDidFinishProcessingUpdates:(nullable void (^)(void))didFinishProcessingUpdates;
/** /**
* Blocks execution of the main thread until all section and item updates are committed to the view. This method must be called from the main thread. * Blocks execution of the main thread until all section and item updates are committed to the view. This method must be called from the main thread.

View File

@ -180,7 +180,7 @@ NS_ASSUME_NONNULL_BEGIN
* the main thread. * the main thread.
* @warning This method is substantially more expensive than UITableView's version. * @warning This method is substantially more expensive than UITableView's version.
*/ */
-(void)reloadDataWithCompletion:(void (^ _Nullable)())completion ASDISPLAYNODE_DEPRECATED_MSG("Use ASTableNode method instead."); -(void)reloadDataWithCompletion:(void (^ _Nullable)(void))completion ASDISPLAYNODE_DEPRECATED_MSG("Use ASTableNode method instead.");
/** /**
* Reload everything from scratch, destroying the working range and all cached nodes. * Reload everything from scratch, destroying the working range and all cached nodes.
@ -219,7 +219,7 @@ NS_ASSUME_NONNULL_BEGIN
* See ASTableNode.h for full documentation of these methods. * See ASTableNode.h for full documentation of these methods.
*/ */
@property (nonatomic, readonly) BOOL isProcessingUpdates; @property (nonatomic, readonly) BOOL isProcessingUpdates;
- (void)onDidFinishProcessingUpdates:(nullable void (^)())completion; - (void)onDidFinishProcessingUpdates:(nullable void (^)(void))completion;
- (void)waitUntilAllUpdatesAreCommitted ASDISPLAYNODE_DEPRECATED_MSG("Use -[ASTableNode waitUntilAllUpdatesAreProcessed] instead."); - (void)waitUntilAllUpdatesAreCommitted ASDISPLAYNODE_DEPRECATED_MSG("Use -[ASTableNode waitUntilAllUpdatesAreProcessed] instead.");
- (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation ASDISPLAYNODE_DEPRECATED_MSG("Use ASTableNode method instead."); - (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation ASDISPLAYNODE_DEPRECATED_MSG("Use ASTableNode method instead.");

View File

@ -78,11 +78,11 @@
#pragma mark - Main Thread Assertions Disabling #pragma mark - Main Thread Assertions Disabling
ASDISPLAYNODE_EXTERN_C_BEGIN ASDISPLAYNODE_EXTERN_C_BEGIN
BOOL ASMainThreadAssertionsAreDisabled(); BOOL ASMainThreadAssertionsAreDisabled(void);
void ASPushMainThreadAssertionsDisabled(); void ASPushMainThreadAssertionsDisabled(void);
void ASPopMainThreadAssertionsDisabled(); void ASPopMainThreadAssertionsDisabled(void);
ASDISPLAYNODE_EXTERN_C_END ASDISPLAYNODE_EXTERN_C_END
#pragma mark - Non-Fatal Assertions #pragma mark - Non-Fatal Assertions

View File

@ -40,31 +40,31 @@ ASDISPLAYNODE_EXTERN_C_BEGIN
* are at the `debug` log level, which the system * are at the `debug` log level, which the system
* disables in production. * disables in production.
*/ */
void ASDisableLogging(); void ASDisableLogging(void);
/// Log for general node events e.g. interfaceState, didLoad. /// Log for general node events e.g. interfaceState, didLoad.
#define ASNodeLogEnabled 1 #define ASNodeLogEnabled 1
os_log_t ASNodeLog(); os_log_t ASNodeLog(void);
/// Log for layout-specific events e.g. calculateLayout. /// Log for layout-specific events e.g. calculateLayout.
#define ASLayoutLogEnabled 1 #define ASLayoutLogEnabled 1
os_log_t ASLayoutLog(); os_log_t ASLayoutLog(void);
/// Log for display-specific events e.g. display queue batches. /// Log for display-specific events e.g. display queue batches.
#define ASDisplayLogEnabled 1 #define ASDisplayLogEnabled 1
os_log_t ASDisplayLog(); os_log_t ASDisplayLog(void);
/// Log for collection events e.g. reloadData, performBatchUpdates. /// Log for collection events e.g. reloadData, performBatchUpdates.
#define ASCollectionLogEnabled 1 #define ASCollectionLogEnabled 1
os_log_t ASCollectionLog(); os_log_t ASCollectionLog(void);
/// Log for ASNetworkImageNode and ASMultiplexImageNode events. /// Log for ASNetworkImageNode and ASMultiplexImageNode events.
#define ASImageLoadingLogEnabled 1 #define ASImageLoadingLogEnabled 1
os_log_t ASImageLoadingLog(); os_log_t ASImageLoadingLog(void);
/// Specialized log for our main thread deallocation trampoline. /// Specialized log for our main thread deallocation trampoline.
#define ASMainThreadDeallocationLogEnabled 0 #define ASMainThreadDeallocationLogEnabled 0
os_log_t ASMainThreadDeallocationLog(); os_log_t ASMainThreadDeallocationLog(void);
ASDISPLAYNODE_EXTERN_C_END ASDISPLAYNODE_EXTERN_C_END

View File

@ -258,7 +258,7 @@ extern NSString * const ASCollectionInvalidUpdateException;
* See ASCollectionNode.h for full documentation of these methods. * See ASCollectionNode.h for full documentation of these methods.
*/ */
@property (nonatomic, readonly) BOOL isProcessingUpdates; @property (nonatomic, readonly) BOOL isProcessingUpdates;
- (void)onDidFinishProcessingUpdates:(nullable void (^)())completion; - (void)onDidFinishProcessingUpdates:(nullable void (^)(void))completion;
- (void)waitUntilAllUpdatesAreProcessed; - (void)waitUntilAllUpdatesAreProcessed;
/** /**

View File

@ -42,7 +42,7 @@ typedef struct ASPrimitiveTraitCollection {
/** /**
* Creates ASPrimitiveTraitCollection with default values. * Creates ASPrimitiveTraitCollection with default values.
*/ */
extern ASPrimitiveTraitCollection ASPrimitiveTraitCollectionMakeDefault(); extern ASPrimitiveTraitCollection ASPrimitiveTraitCollectionMakeDefault(void);
/** /**
* Creates a ASPrimitiveTraitCollection from a given UITraitCollection. * Creates a ASPrimitiveTraitCollection from a given UITraitCollection.

View File

@ -37,9 +37,9 @@ extern int32_t const ASLayoutElementContextDefaultTransitionID;
// Does not currently support nesting there must be no current context. // Does not currently support nesting there must be no current context.
extern void ASLayoutElementPushContext(ASLayoutElementContext * context); extern void ASLayoutElementPushContext(ASLayoutElementContext * context);
extern ASLayoutElementContext * _Nullable ASLayoutElementGetCurrentContext(); extern ASLayoutElementContext * _Nullable ASLayoutElementGetCurrentContext(void);
extern void ASLayoutElementPopContext(); extern void ASLayoutElementPopContext(void);
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@ -154,7 +154,7 @@ NS_ASSUME_NONNULL_BEGIN
* Boolean parameter that contains the value YES if all of the related animations completed successfully or * Boolean parameter that contains the value YES if all of the related animations completed successfully or
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
*/ */
- (void)performBatchAnimated:(BOOL)animated updates:(nullable AS_NOESCAPE void (^)())updates completion:(nullable void (^)(BOOL finished))completion; - (void)performBatchAnimated:(BOOL)animated updates:(nullable AS_NOESCAPE void (^)(void))updates completion:(nullable void (^)(BOOL finished))completion;
/** /**
* Perform a batch of updates asynchronously. This method must be called from the main thread. * Perform a batch of updates asynchronously. This method must be called from the main thread.
@ -165,7 +165,7 @@ NS_ASSUME_NONNULL_BEGIN
* Boolean parameter that contains the value YES if all of the related animations completed successfully or * Boolean parameter that contains the value YES if all of the related animations completed successfully or
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread. * NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
*/ */
- (void)performBatchUpdates:(nullable AS_NOESCAPE void (^)())updates completion:(nullable void (^)(BOOL finished))completion; - (void)performBatchUpdates:(nullable AS_NOESCAPE void (^)(void))updates completion:(nullable void (^)(BOOL finished))completion;
/** /**
* Triggers a relayout of all nodes. * Triggers a relayout of all nodes.

View File

@ -32,15 +32,15 @@ BOOL ASSubclassOverridesClassSelector(Class superclass, Class subclass, SEL sele
IMP ASReplaceMethodWithBlock(Class c, SEL origSEL, id block); IMP ASReplaceMethodWithBlock(Class c, SEL origSEL, id block);
/// Dispatches the given block to the main queue if not already running on the main thread /// Dispatches the given block to the main queue if not already running on the main thread
void ASPerformBlockOnMainThread(void (^block)()); void ASPerformBlockOnMainThread(void (^block)(void));
/// Dispatches the given block to a background queue with priority of DISPATCH_QUEUE_PRIORITY_DEFAULT if not already run on a background queue /// Dispatches the given block to a background queue with priority of DISPATCH_QUEUE_PRIORITY_DEFAULT if not already run on a background queue
void ASPerformBlockOnBackgroundThread(void (^block)()); // DISPATCH_QUEUE_PRIORITY_DEFAULT void ASPerformBlockOnBackgroundThread(void (^block)(void)); // DISPATCH_QUEUE_PRIORITY_DEFAULT
/// For deallocation of objects on a background thread without GCD overhead / thread explosion /// For deallocation of objects on a background thread without GCD overhead / thread explosion
void ASPerformBackgroundDeallocation(id object); void ASPerformBackgroundDeallocation(id object);
CGFloat ASScreenScale(); CGFloat ASScreenScale(void);
CGSize ASFloorSizeValues(CGSize s); CGSize ASFloorSizeValues(CGSize s);
@ -80,7 +80,7 @@ ASDISPLAYNODE_INLINE BOOL ASImageAlphaInfoIsOpaque(CGImageAlphaInfo info) {
@param withoutAnimation Set to `YES` to perform given block without animation @param withoutAnimation Set to `YES` to perform given block without animation
@param block Perform UIView geometry changes within the passed block @param block Perform UIView geometry changes within the passed block
*/ */
ASDISPLAYNODE_INLINE void ASPerformBlockWithoutAnimation(BOOL withoutAnimation, void (^block)()) { ASDISPLAYNODE_INLINE void ASPerformBlockWithoutAnimation(BOOL withoutAnimation, void (^block)(void)) {
if (withoutAnimation) { if (withoutAnimation) {
[UIView performWithoutAnimation:block]; [UIView performWithoutAnimation:block];
} else { } else {

View File

@ -60,7 +60,7 @@ IMP ASReplaceMethodWithBlock(Class c, SEL origSEL, id block)
} }
} }
void ASPerformBlockOnMainThread(void (^block)()) void ASPerformBlockOnMainThread(void (^block)(void))
{ {
if (block == nil){ if (block == nil){
return; return;
@ -72,7 +72,7 @@ void ASPerformBlockOnMainThread(void (^block)())
} }
} }
void ASPerformBlockOnBackgroundThread(void (^block)()) void ASPerformBlockOnBackgroundThread(void (^block)(void))
{ {
if (block == nil){ if (block == nil){
return; return;

View File

@ -164,13 +164,13 @@ static inline CGRect ASTextEmojiGetGlyphBoundingRectWithFontSize(CGFloat fontSiz
Get the character set which should rotate in vertical form. Get the character set which should rotate in vertical form.
@return The shared character set. @return The shared character set.
*/ */
NSCharacterSet *ASTextVerticalFormRotateCharacterSet(); NSCharacterSet *ASTextVerticalFormRotateCharacterSet(void);
/** /**
Get the character set which should rotate and move in vertical form. Get the character set which should rotate and move in vertical form.
@return The shared character set. @return The shared character set.
*/ */
NSCharacterSet *ASTextVerticalFormRotateAndMoveCharacterSet(); NSCharacterSet *ASTextVerticalFormRotateAndMoveCharacterSet(void);
/// Get the transform rotation. /// Get the transform rotation.