The Trunk: Collections-nice.244.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.244.mcz

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

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

Name: Collections-nice.244
Author: nice
Time: 9 December 2009, 2:24:31 am
UUID: bb113dba-c81b-1f41-9185-65495b2b5f86
Ancestors: Collections-nice.243

Cosmetic clean-up:
- remove a useless send to private setString:setRuns: (and a useless Text creation)
- remove a useless send to oldBack crap


=============== Diff against Collections-nice.243 ===============

Item was changed:
  ----- Method: String>>asSignedInteger (in category 'converting') -----
  asSignedInteger
  "Returns the first signed integer it can find or nil."
 
+ | start |
- | start stream |
  start := self findFirst: [:char | char isDigit].
  start isZero ifTrue: [^ nil].
+ (start > 1 and: [self at: start - 1]) = $- ifTrue: [start := start - 1].
+ ^ Integer readFrom: (ReadStream on: self from: start to: self size)!
- stream := (ReadStream on: self) position: start.
- stream oldBack = $- ifTrue: [stream oldBack].
- ^ Integer readFrom: stream!

Item was changed:
  ----- Method: AttributedTextStream>>contents (in category 'retrieving the text') -----
  contents
  | ans |
  currentRun > 0 ifTrue:[
  attributeValues nextPut: currentAttributes.
  attributeRuns nextPut: currentRun.
  currentRun := 0].
+ ans := Text string: characters contents  runs:
- ans := Text new: characters size.
- "this is declared private, but it's exactly what I need, and it's declared as exactly what I want it to do...."
- ans setString: characters contents  setRuns:
  (RunArray runs: attributeRuns contents values: attributeValues contents).
  ^ans!