Overview
Comment: | Only handle the first matching object in OFMutalbeArray operations.
This only makes sense as we use "Object" in the method names, implying |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
de45535c23983c1f258c37cbcadb97bf |
User & Date: | js on 2010-09-19 02:34:10 |
Other Links: | manifest | tags |
Context
2010-09-19
| ||
02:52 | Improve OFStreamObserver. check-in: b554732eae user: js tags: trunk | |
02:34 | Only handle the first matching object in OFMutalbeArray operations. check-in: de45535c23 user: js tags: trunk | |
02:05 | Update buildsys. check-in: c3cc5bb657 user: js tags: trunk | |
Changes
Modified src/OFMutableArray.h from [a52014b3ad] to [cb7ba1bfa9].
︙ | |||
36 37 38 39 40 41 42 | 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 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 | - + - - - + + - - + + - + - + - - + | * \param obj An object to add * \param index The index where the object should be added */ - (void)addObject: (id)obj atIndex: (size_t)index; /** |
︙ |
Modified src/OFMutableArray.m from [cd027f3f1d] to [c66c422e10].
︙ | |||
61 62 63 64 65 66 67 68 69 70 71 | 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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | + + - - + + - - + + + - - - - - - - + - - - - - - - - - - - + - - - - - + - - - + + - + | size_t i, count = [array count]; for (i = 0; i < count; i++) { if ([objs[i] isEqual: old]) { [new retain]; [objs[i] release]; objs[i] = new; return; } } } |
︙ |
Modified tests/OFArrayTests.m from [415ab0ae8e] to [895b4e152f].
︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - + - - + + - + - + - + | [[m[0] objectAtIndex: 1] isEqual: c_ary[0]] && [[m[0] objectAtIndex: 2] isEqual: c_ary[2]]) TEST(@"-[replaceObject:identicalTo:]", R([m[0] replaceObjectIdenticalTo: c_ary[0] withObject: c_ary[1]]) && [[m[0] objectAtIndex: 0] isEqual: c_ary[1]] && |
︙ |