The Trunk: Collections-nice.831.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-nice.831.mcz

commits-2
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.831.mcz

==================== Summary ====================

Name: Collections-nice.831
Author: nice
Time: 7 May 2019, 9:33:06.030048 am
UUID: f1eda889-8e88-4e90-aca1-96620127ab63
Ancestors: Collections-nice.830

Fix two occurrences of addLast:times: that crept in since I proposed the deprecation.

=============== Diff against Collections-nice.830 ===============

Item was changed:
  ----- Method: HtmlReadWriter>>processRunStackTop (in category 'reading') -----
  processRunStackTop
  "Write accumulated attributes to run array."
 
  | currentIndex start attrs |
  currentIndex := count - offset.
  start := runStack top second.
  attrs := runStack top first.
  runArray
+ add: attrs asArray
+ withOccurrences: currentIndex - start + 1.!
- addLast: attrs asArray
- times: currentIndex - start + 1.!

Item was changed:
  ----- Method: Text>>setString:setRunsChecking: (in category 'private') -----
  setString: aString setRunsChecking: aRunArray
  | stringSize runsSize |
  string := aString.
  aRunArray ifNil: [^ aString asText].
 
  "Check runs and do the best you can to make them fit..."
  aRunArray runs size = aRunArray values size ifFalse: [^ aString asText]. "raise error here?"
  runsSize := aRunArray size.
  stringSize := string size.
  runs := stringSize = runsSize
  ifTrue: [aRunArray]
  ifFalse: [ stringSize > runsSize
+ ifTrue: [aRunArray  add: {} withOccurrences: stringSize - runsSize]
- ifTrue: [aRunArray  addLast: {} times: stringSize - runsSize]
  ifFalse: [aRunArray copyFrom: 1 to: stringSize]].!