The Trunk: Multilingual-ul.211.mcz

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

The Trunk: Multilingual-ul.211.mcz

commits-2
Levente Uzonyi uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-ul.211.mcz

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

Name: Multilingual-ul.211
Author: ul
Time: 30 March 2016, 10:46:08.466045 pm
UUID: 7d40f4e7-1bcf-4f5c-b68e-11269dbb32d9
Ancestors: Multilingual-ul.210

Improved #peekFor: performance.

=============== Diff against Multilingual-ul.210 ===============

Item was changed:
  ----- Method: MultiByteBinaryOrTextStream>>peekFor: (in category 'public') -----
  peekFor: item
 
+ | state |
- | next state |
  "self atEnd ifTrue: [^ false]. -- SFStream will give nil"
  state := converter saveStateOf: self.
+ (self next ifNil: [ ^false ]) = item ifTrue: [ ^true ].
- (next := self next) ifNil: [^ false].
- item = next ifTrue: [^ true].
  converter restoreStateOf: self with: state.
  ^ false.
  !

Item was changed:
  ----- Method: MultiByteFileStream>>peekFor: (in category 'public') -----
  peekFor: item
 
+ | state |
- | next state |
  "self atEnd ifTrue: [^ false]. -- SFStream will give nil"
  state := converter saveStateOf: self.
+ (self next ifNil: [ ^false ]) = item ifTrue: [ ^true ].
- (next := self next) ifNil: [^ false].
- item = next ifTrue: [^ true].
  converter restoreStateOf: self with: state.
  ^ false.
  !