mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-01 18:33:10 +00:00
Fix "This block and function declaration is not a prototype" warning. (#619)
This commit is contained in:
parent
72d33fc88e
commit
1e7d46196f
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* 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.
|
||||
typedef BOOL(^asdisplaynode_iscancelled_block_t)(void);
|
||||
|
@ -244,7 +244,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* 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.
|
||||
*/
|
||||
- (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.
|
||||
@ -255,7 +255,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* 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.
|
||||
*/
|
||||
- (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:.
|
||||
@ -284,7 +284,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*
|
||||
* 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.
|
||||
@ -382,7 +382,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* the main thread.
|
||||
* @warning This method is substantially more expensive than UICollectionView's version.
|
||||
*/
|
||||
- (void)reloadDataWithCompletion:(nullable void (^)())completion;
|
||||
- (void)reloadDataWithCompletion:(nullable void (^)(void))completion;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -256,7 +256,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* 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.
|
||||
*/
|
||||
- (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.
|
||||
@ -267,7 +267,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* 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.
|
||||
*/
|
||||
- (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.
|
||||
@ -276,7 +276,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* the main thread.
|
||||
* @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.
|
||||
@ -296,7 +296,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* See ASCollectionNode.h for full documentation of these methods.
|
||||
*/
|
||||
@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.");
|
||||
|
||||
/**
|
||||
|
@ -28,8 +28,8 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
ASDISPLAYNODE_EXTERN_C_BEGIN
|
||||
void ASPerformBlockOnMainThread(void (^block)());
|
||||
void ASPerformBlockOnBackgroundThread(void (^block)()); // DISPATCH_QUEUE_PRIORITY_DEFAULT
|
||||
void ASPerformBlockOnMainThread(void (^block)(void));
|
||||
void ASPerformBlockOnBackgroundThread(void (^block)(void)); // DISPATCH_QUEUE_PRIORITY_DEFAULT
|
||||
ASDISPLAYNODE_EXTERN_C_END
|
||||
|
||||
#if ASEVENTLOG_ENABLE
|
||||
|
@ -36,17 +36,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
typedef UIViewController * _Nonnull(^ASDisplayNodeViewControllerBlock)();
|
||||
typedef UIViewController * _Nonnull(^ASDisplayNodeViewControllerBlock)(void);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
@ -880,7 +880,7 @@ extern NSInteger const ASDefaultDrawingPriority;
|
||||
- (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize
|
||||
animated:(BOOL)animated
|
||||
shouldMeasureAsync:(BOOL)shouldMeasureAsync
|
||||
measurementCompletion:(nullable void(^)())completion;
|
||||
measurementCompletion:(nullable void(^)(void))completion;
|
||||
|
||||
|
||||
/**
|
||||
@ -897,7 +897,7 @@ extern NSInteger const ASDefaultDrawingPriority;
|
||||
*/
|
||||
- (void)transitionLayoutWithAnimation:(BOOL)animated
|
||||
shouldMeasureAsync:(BOOL)shouldMeasureAsync
|
||||
measurementCompletion:(nullable void(^)())completion;
|
||||
measurementCompletion:(nullable void(^)(void))completion;
|
||||
|
||||
/**
|
||||
* @abstract Cancels all performing layout transitions. Can be called on any thread.
|
||||
|
@ -208,8 +208,8 @@ extern __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSubnode(ASDispla
|
||||
*/
|
||||
extern __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSubnodeOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT;
|
||||
|
||||
extern UIColor *ASDisplayNodeDefaultPlaceholderColor() AS_WARN_UNUSED_RESULT;
|
||||
extern UIColor *ASDisplayNodeDefaultTintColor() AS_WARN_UNUSED_RESULT;
|
||||
extern UIColor *ASDisplayNodeDefaultPlaceholderColor(void) 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.
|
||||
|
@ -172,7 +172,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* the main thread.
|
||||
* @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.
|
||||
@ -198,7 +198,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* 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.
|
||||
*/
|
||||
- (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.
|
||||
@ -209,7 +209,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* 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.
|
||||
*/
|
||||
- (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:.
|
||||
@ -238,7 +238,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*
|
||||
* 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.
|
||||
|
@ -180,7 +180,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* the main thread.
|
||||
* @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.
|
||||
@ -219,7 +219,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* See ASTableNode.h for full documentation of these methods.
|
||||
*/
|
||||
@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)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation ASDISPLAYNODE_DEPRECATED_MSG("Use ASTableNode method instead.");
|
||||
|
@ -78,11 +78,11 @@
|
||||
#pragma mark - Main Thread Assertions Disabling
|
||||
|
||||
ASDISPLAYNODE_EXTERN_C_BEGIN
|
||||
BOOL ASMainThreadAssertionsAreDisabled();
|
||||
BOOL ASMainThreadAssertionsAreDisabled(void);
|
||||
|
||||
void ASPushMainThreadAssertionsDisabled();
|
||||
void ASPushMainThreadAssertionsDisabled(void);
|
||||
|
||||
void ASPopMainThreadAssertionsDisabled();
|
||||
void ASPopMainThreadAssertionsDisabled(void);
|
||||
ASDISPLAYNODE_EXTERN_C_END
|
||||
|
||||
#pragma mark - Non-Fatal Assertions
|
||||
|
@ -40,31 +40,31 @@ ASDISPLAYNODE_EXTERN_C_BEGIN
|
||||
* are at the `debug` log level, which the system
|
||||
* disables in production.
|
||||
*/
|
||||
void ASDisableLogging();
|
||||
void ASDisableLogging(void);
|
||||
|
||||
/// Log for general node events e.g. interfaceState, didLoad.
|
||||
#define ASNodeLogEnabled 1
|
||||
os_log_t ASNodeLog();
|
||||
os_log_t ASNodeLog(void);
|
||||
|
||||
/// Log for layout-specific events e.g. calculateLayout.
|
||||
#define ASLayoutLogEnabled 1
|
||||
os_log_t ASLayoutLog();
|
||||
os_log_t ASLayoutLog(void);
|
||||
|
||||
/// Log for display-specific events e.g. display queue batches.
|
||||
#define ASDisplayLogEnabled 1
|
||||
os_log_t ASDisplayLog();
|
||||
os_log_t ASDisplayLog(void);
|
||||
|
||||
/// Log for collection events e.g. reloadData, performBatchUpdates.
|
||||
#define ASCollectionLogEnabled 1
|
||||
os_log_t ASCollectionLog();
|
||||
os_log_t ASCollectionLog(void);
|
||||
|
||||
/// Log for ASNetworkImageNode and ASMultiplexImageNode events.
|
||||
#define ASImageLoadingLogEnabled 1
|
||||
os_log_t ASImageLoadingLog();
|
||||
os_log_t ASImageLoadingLog(void);
|
||||
|
||||
/// Specialized log for our main thread deallocation trampoline.
|
||||
#define ASMainThreadDeallocationLogEnabled 0
|
||||
os_log_t ASMainThreadDeallocationLog();
|
||||
os_log_t ASMainThreadDeallocationLog(void);
|
||||
|
||||
ASDISPLAYNODE_EXTERN_C_END
|
||||
|
||||
|
@ -258,7 +258,7 @@ extern NSString * const ASCollectionInvalidUpdateException;
|
||||
* See ASCollectionNode.h for full documentation of these methods.
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL isProcessingUpdates;
|
||||
- (void)onDidFinishProcessingUpdates:(nullable void (^)())completion;
|
||||
- (void)onDidFinishProcessingUpdates:(nullable void (^)(void))completion;
|
||||
- (void)waitUntilAllUpdatesAreProcessed;
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,7 @@ typedef struct ASPrimitiveTraitCollection {
|
||||
/**
|
||||
* Creates ASPrimitiveTraitCollection with default values.
|
||||
*/
|
||||
extern ASPrimitiveTraitCollection ASPrimitiveTraitCollectionMakeDefault();
|
||||
extern ASPrimitiveTraitCollection ASPrimitiveTraitCollectionMakeDefault(void);
|
||||
|
||||
/**
|
||||
* Creates a ASPrimitiveTraitCollection from a given UITraitCollection.
|
||||
|
@ -37,9 +37,9 @@ extern int32_t const ASLayoutElementContextDefaultTransitionID;
|
||||
// Does not currently support nesting – there must be no current 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
|
||||
|
||||
|
@ -154,7 +154,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* 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.
|
||||
*/
|
||||
- (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.
|
||||
@ -165,7 +165,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* 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.
|
||||
*/
|
||||
- (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.
|
||||
|
@ -32,15 +32,15 @@ BOOL ASSubclassOverridesClassSelector(Class superclass, Class subclass, SEL sele
|
||||
IMP ASReplaceMethodWithBlock(Class c, SEL origSEL, id block);
|
||||
|
||||
/// 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
|
||||
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
|
||||
void ASPerformBackgroundDeallocation(id object);
|
||||
|
||||
CGFloat ASScreenScale();
|
||||
CGFloat ASScreenScale(void);
|
||||
|
||||
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 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) {
|
||||
[UIView performWithoutAnimation:block];
|
||||
} else {
|
||||
|
@ -60,7 +60,7 @@ IMP ASReplaceMethodWithBlock(Class c, SEL origSEL, id block)
|
||||
}
|
||||
}
|
||||
|
||||
void ASPerformBlockOnMainThread(void (^block)())
|
||||
void ASPerformBlockOnMainThread(void (^block)(void))
|
||||
{
|
||||
if (block == nil){
|
||||
return;
|
||||
@ -72,7 +72,7 @@ void ASPerformBlockOnMainThread(void (^block)())
|
||||
}
|
||||
}
|
||||
|
||||
void ASPerformBlockOnBackgroundThread(void (^block)())
|
||||
void ASPerformBlockOnBackgroundThread(void (^block)(void))
|
||||
{
|
||||
if (block == nil){
|
||||
return;
|
||||
|
@ -164,13 +164,13 @@ static inline CGRect ASTextEmojiGetGlyphBoundingRectWithFontSize(CGFloat fontSiz
|
||||
Get the character set which should rotate in vertical form.
|
||||
@return The shared character set.
|
||||
*/
|
||||
NSCharacterSet *ASTextVerticalFormRotateCharacterSet();
|
||||
NSCharacterSet *ASTextVerticalFormRotateCharacterSet(void);
|
||||
|
||||
/**
|
||||
Get the character set which should rotate and move in vertical form.
|
||||
@return The shared character set.
|
||||
*/
|
||||
NSCharacterSet *ASTextVerticalFormRotateAndMoveCharacterSet();
|
||||
NSCharacterSet *ASTextVerticalFormRotateAndMoveCharacterSet(void);
|
||||
|
||||
|
||||
/// Get the transform rotation.
|
||||
|
Loading…
x
Reference in New Issue
Block a user