Overview
Comment: | Remove redundant arguments from blocks
Arguments that can just be captured by the block don't need to be |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d7ddb3dbc70606ce23d81a1b97c7c5c5 |
User & Date: | js on 2020-04-26 19:39:06 |
Other Links: | manifest | tags |
Context
2020-04-29
| ||
23:59 | Add OFSPXSocket check-in: 857f8edc09 user: js tags: trunk | |
2020-04-26
| ||
19:39 | Remove redundant arguments from blocks check-in: d7ddb3dbc7 user: js tags: trunk | |
18:10 | Move accept and listen OF{TCP -> Stream}Socket check-in: 13a8f43898 user: js tags: trunk | |
Changes
Modified src/OFDatagramSocket.h from [ed9d7f131c] to [a18e14bea6].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - - - - + + - - - + + | @class OFData; @class OFDatagramSocket; #ifdef OF_HAVE_BLOCKS /*! * @brief A block which is called when a packet has been received. * |
︙ |
Modified src/OFRunLoop.m from [ae15c876fb] to [964085efa2].
︙ | |||
438 439 440 441 442 443 444 | 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | - + | } @catch (id e) { length = 0; exception = e; } # ifdef OF_HAVE_BLOCKS if (_block != NULL) |
︙ | |||
486 487 488 489 490 491 492 | 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | - + | if (_readLength != _exactLength && ![object isAtEndOfStream] && exception == nil) return true; # ifdef OF_HAVE_BLOCKS if (_block != NULL) { |
︙ | |||
538 539 540 541 542 543 544 | 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | - + | } if (line == nil && ![object isAtEndOfStream] && exception == nil) return true; # ifdef OF_HAVE_BLOCKS if (_block != NULL) |
︙ | |||
588 589 590 591 592 593 594 | 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | - + | _writtenLength += length; if (_writtenLength != dataLength && exception == nil) return true; # ifdef OF_HAVE_BLOCKS if (_block != NULL) { |
︙ | |||
660 661 662 663 664 665 666 | 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | - + - | _writtenLength += length; if (_writtenLength != cStringLength && exception == nil) return true; # ifdef OF_HAVE_BLOCKS if (_block != NULL) { |
︙ | |||
768 769 770 771 772 773 774 | 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 | - + - + | exception = e; } # ifdef OF_HAVE_BLOCKS if (_block != NULL) { if ([object isKindOfClass: [OFStreamSocket class]]) return ((of_stream_socket_async_accept_block_t) |
︙ | |||
818 819 820 821 822 823 824 | 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 | - + | } @catch (id e) { length = 0; exception = e; } # ifdef OF_HAVE_BLOCKS if (_block != NULL) |
︙ | |||
861 862 863 864 865 866 867 | 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 | - + | receiver: &_receiver]; } @catch (id e) { exception = e; } # ifdef OF_HAVE_BLOCKS if (_block != NULL) { |
︙ | |||
922 923 924 925 926 927 928 | 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 | - + | } @catch (id e) { length = 0; exception = e; } # ifdef OF_HAVE_BLOCKS if (_block != NULL) |
︙ | |||
963 964 965 966 967 968 969 | 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 | - + | length: _data.count * _data.itemSize]; } @catch (id e) { exception = e; } # ifdef OF_HAVE_BLOCKS if (_block != NULL) { |
︙ |
Modified src/OFSequencedPacketSocket.h from [c46ceeaf1d] to [a59d130a79].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - - - + - - + - - - + - - + - | @class OFData; @class OFSequencedPacketSocket; #ifdef OF_HAVE_BLOCKS /*! * @brief A block which is called when a packet has been received. * |
︙ |
Modified src/OFStream.h from [190450d179] to [854f995c5b].
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - - - - + + - - - + + - - + - - - + | @class OFData; #if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_BLOCKS) /*! * @brief A block which is called when data was read asynchronously from a * stream. * |
︙ |
Modified src/OFStreamSocket.h from [40b6afda8c] to [ded40b41a4].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - - + | @class OFStreamSocket; #ifdef OF_HAVE_BLOCKS /*! * @brief A block which is called when the socket accepted a connection. * |
︙ |
Modified src/OFTCPSocket.h from [085c9c8662] to [8293d08642].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - - + - | @class OFTCPSocket; @class OFString; #ifdef OF_HAVE_BLOCKS /*! * @brief A block which is called when the socket connected. * |
︙ |
Modified src/OFTCPSocket.m from [bb1a762052] to [36820b9499].
︙ | |||
204 205 206 207 208 209 210 | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - + | - (void)didConnect { if (_exception == nil) _socket.blocking = true; #ifdef OF_HAVE_BLOCKS if (_block != NULL) |
︙ |