#REFACTORING
authorClaus Gittinger <cg@exept.de>
Tue, 22 Mar 2016 12:14:01 +0100
changeset 19395 37f5d5f46cc2
parent 19394 5bb715922976
child 19396 f2f97c9c3e72
#REFACTORING class: Stream changed: #nextUnsigned:MSB:
Stream.st
--- a/Stream.st	Tue Mar 22 12:13:15 2016 +0100
+++ b/Stream.st	Tue Mar 22 12:14:01 2016 +0100
@@ -1277,7 +1277,7 @@
      order, please use the corresponding xxxNet methods, which use a standard
      network byte order."
 
-    |val shift byte3|
+    |val shift|
 
     "claus: this method is central in binaryStorage -
      therefore it has been tuned a bit (and needs even more tuning)"
@@ -1289,12 +1289,7 @@
         ^ self nextUnsignedInt16MSB:msbFlag
     ].
     numBytes == 3 ifTrue:[
-        val := self nextUnsignedInt16MSB:msbFlag.
-        byte3 := self nextByte.
-        msbFlag ifTrue:[
-            ^ (val bitShift:8) + byte3
-        ].
-        ^ val + (byte3 bitShift:16)
+        ^ self nextUnsignedInt24MSB:msbFlag.
     ].
     numBytes == 4 ifTrue:[
         ^ self nextUnsignedInt32MSB:msbFlag