[squeak-dev] The Trunk: Files-ul.151.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Mar 30 20:39:21 UTC 2016


Levente Uzonyi uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ul.151.mcz

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

Name: Files-ul.151
Author: ul
Time: 30 March 2016, 2:24:00.086677 am
UUID: 5c8941ce-af98-4464-8bad-423c8bf7ddb5
Ancestors: Files-mt.150

Improvement #peekFor: performance.

=============== Diff against Files-mt.150 ===============

Item was changed:
  ----- Method: StandardFileStream>>peekFor: (in category 'access') -----
  peekFor: item 
  	"Answer false and do not advance if the next element is not equal to item, or if this stream is at the end.  If the next element is equal to item, then advance over it and return true"
+ 
- 	| next |
  	"self atEnd ifTrue: [^ false]. -- SFStream will give nil"
+ 	(self next ifNil: [ ^false ]) = item ifTrue: [ ^true ].
- 	(next := self next) == nil ifTrue: [^ false].
- 	item = next ifTrue: [^ true].
  	self skip: -1.
  	^ false!



More information about the Squeak-dev mailing list