0001-conform-to-c99-to-compile.patch 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. From 16a7249fe7149b471a5c1eb7d70a83aa3b6625e3 Mon Sep 17 00:00:00 2001
  2. From: Carola Nitz <nitz.carola@googlemail.com>
  3. Date: Fri, 7 Feb 2014 21:54:18 +0100
  4. Subject: [PATCH] conform to c99 to compile
  5. ---
  6. .../LXReorderableCollectionViewFlowLayout.m | 18 +++++++++---------
  7. 1 file changed, 9 insertions(+), 9 deletions(-)
  8. diff --git a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m
  9. index 744cc30..5e7008f 100755
  10. --- a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m
  11. +++ b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m
  12. @@ -162,15 +162,15 @@ static NSString * const kLXCollectionViewKeyPath = @"collectionView";
  13. [self.dataSource collectionView:self.collectionView itemAtIndexPath:previousIndexPath willMoveToIndexPath:newIndexPath];
  14. }
  15. - __weak typeof(self) weakSelf = self;
  16. + __weak __typeof(self) weakSelf = self;
  17. [self.collectionView performBatchUpdates:^{
  18. - __strong typeof(self) strongSelf = weakSelf;
  19. + __strong __typeof(self) strongSelf = weakSelf;
  20. if (strongSelf) {
  21. [strongSelf.collectionView deleteItemsAtIndexPaths:@[ previousIndexPath ]];
  22. [strongSelf.collectionView insertItemsAtIndexPaths:@[ newIndexPath ]];
  23. }
  24. } completion:^(BOOL finished) {
  25. - __strong typeof(self) strongSelf = weakSelf;
  26. + __strong __typeof(self) strongSelf = weakSelf;
  27. if ([strongSelf.dataSource respondsToSelector:@selector(collectionView:itemAtIndexPath:didMoveToIndexPath:)]) {
  28. [strongSelf.dataSource collectionView:strongSelf.collectionView itemAtIndexPath:previousIndexPath didMoveToIndexPath:newIndexPath];
  29. }
  30. @@ -304,13 +304,13 @@ static NSString * const kLXCollectionViewKeyPath = @"collectionView";
  31. self.currentViewCenter = self.currentView.center;
  32. - __weak typeof(self) weakSelf = self;
  33. + __weak __typeof(self) weakSelf = self;
  34. [UIView
  35. animateWithDuration:0.3
  36. delay:0.0
  37. options:UIViewAnimationOptionBeginFromCurrentState
  38. animations:^{
  39. - __strong typeof(self) strongSelf = weakSelf;
  40. + __strong __typeof(self) strongSelf = weakSelf;
  41. if (strongSelf) {
  42. strongSelf.currentView.transform = CGAffineTransformMakeScale(1.1f, 1.1f);
  43. highlightedImageView.alpha = 0.0f;
  44. @@ -318,7 +318,7 @@ static NSString * const kLXCollectionViewKeyPath = @"collectionView";
  45. }
  46. }
  47. completion:^(BOOL finished) {
  48. - __strong typeof(self) strongSelf = weakSelf;
  49. + __strong __typeof(self) strongSelf = weakSelf;
  50. if (strongSelf) {
  51. [highlightedImageView removeFromSuperview];
  52. @@ -344,20 +344,20 @@ static NSString * const kLXCollectionViewKeyPath = @"collectionView";
  53. UICollectionViewLayoutAttributes *layoutAttributes = [self layoutAttributesForItemAtIndexPath:currentIndexPath];
  54. - __weak typeof(self) weakSelf = self;
  55. + __weak __typeof(self) weakSelf = self;
  56. [UIView
  57. animateWithDuration:0.3
  58. delay:0.0
  59. options:UIViewAnimationOptionBeginFromCurrentState
  60. animations:^{
  61. - __strong typeof(self) strongSelf = weakSelf;
  62. + __strong __typeof(self) strongSelf = weakSelf;
  63. if (strongSelf) {
  64. strongSelf.currentView.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
  65. strongSelf.currentView.center = layoutAttributes.center;
  66. }
  67. }
  68. completion:^(BOOL finished) {
  69. - __strong typeof(self) strongSelf = weakSelf;
  70. + __strong __typeof(self) strongSelf = weakSelf;
  71. if (strongSelf) {
  72. [strongSelf.currentView removeFromSuperview];
  73. strongSelf.currentView = nil;
  74. --
  75. 1.8.3.4 (Apple Git-47)