class: ReadStream
authorClaus Gittinger <cg@exept.de>
Mon, 03 Jun 2013 20:39:38 +0200
changeset 15356 854a02a2bebc
parent 15355 8d39f7b4eb52
child 15357 10a1cd767648
class: ReadStream changed:5 methods (foo+1) > x is the same as foo >= x
ReadStream.st
--- a/ReadStream.st	Mon Jun 03 20:39:21 2013 +0200
+++ b/ReadStream.st	Mon Jun 03 20:39:38 2013 +0200
@@ -209,7 +209,7 @@
         }
     }
 %}.
-    ((position + 1) > readLimit) ifTrue:[^ self pastEndRead].
+    (position >= readLimit) ifTrue:[^ self pastEndRead].
     ret := collection at:(position + 1).
     position := position + 1.
     ^ ret
@@ -360,7 +360,7 @@
         }
     }
 %}.
-    ((position + 1) > readLimit) ifTrue:[^ self pastEndRead].
+    (position >= readLimit) ifTrue:[^ self pastEndRead].
     ret := collection at:(position + 1).
     position := position + 1.
     ^ ret asInteger
@@ -556,9 +556,9 @@
         }
     }
 %}.
-    ((position + 1) > readLimit) ifTrue:[^ self pastEndRead].
+    (position >= readLimit) ifTrue:[^ self pastEndRead].
     position := position + 1.
-    ((position + 1) > readLimit) ifTrue:[^ self pastEndRead].
+    (position >= readLimit) ifTrue:[^ self pastEndRead].
     ^ collection at:(position + 1)
 !
 
@@ -603,7 +603,7 @@
         }
     }
 %}.
-    ((position + 1) > readLimit) ifTrue:[^ self pastEndRead].
+    (position >= readLimit) ifTrue:[^ self pastEndRead].
     ^ collection at:(position + 1)
 !
 
@@ -653,7 +653,7 @@
         }
     }
 %}.
-    ((position + 1) > readLimit) ifTrue:[^ nil].
+    (position >= readLimit) ifTrue:[^ nil].
     ^ collection at:(position + 1)
 !
 
@@ -847,10 +847,10 @@
 !ReadStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.68 2013-06-03 18:30:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.69 2013-06-03 18:39:38 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.68 2013-06-03 18:30:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.69 2013-06-03 18:39:38 cg Exp $'
 ! !