ShortFloat.st
changeset 21878 316b3400a392
parent 21872 873afa36c013
child 21891 e697cc4bbc7c
--- a/ShortFloat.st	Wed Jun 21 09:46:07 2017 +0200
+++ b/ShortFloat.st	Wed Jun 21 10:38:46 2017 +0200
@@ -352,14 +352,14 @@
 
     |f|
 
-    f := ShortFloat basicNew.
+    f := self basicNew.
     self readBinaryIEEESingleFrom:aStream into:f MSB:(UninterpretedBytes isBigEndian).
     ^ f
 
     "not part of libboss, as this is also used by others (TIFFReader)"
 
     "Created: / 16-04-1996 / 21:00:35 / cg"
-    "Modified: / 23-08-2006 / 16:01:47 / cg"
+    "Modified: / 21-06-2017 / 10:38:31 / cg"
 !
 
 readBinaryIEEESingleFrom:aStream MSB:msbFirst
@@ -369,14 +369,14 @@
 
     |f|
 
-    f := ShortFloat basicNew.
+    f := self basicNew.
     self readBinaryIEEESingleFrom:aStream into:f MSB:msbFirst.
     ^ f
 
     "not part of libboss, as this is also used by others (TIFFReader)"
 
     "Created: / 16-04-1996 / 21:00:35 / cg"
-    "Modified: / 23-08-2006 / 16:01:47 / cg"
+    "Modified: / 21-06-2017 / 10:38:35 / cg"
 !
 
 readBinaryIEEESingleFrom:aStream into:aBasicNewShortFloat
@@ -394,7 +394,7 @@
      interpreting the next bytes as an IEEE formatted 4-byte float.
      If msb is true, the stream bytes are most-significant-first."
 
-    aBasicNewShortFloat class == self ifFalse:[self error:'no a ShortFloat'].
+    aBasicNewShortFloat class == self ifFalse:[self error:'not a ShortFloat'].
 
     "
      this implementation is wrong: does not work on non-IEEE machines
@@ -404,19 +404,19 @@
     self isIEEEFormat ifFalse:[self error:'unsupported operation'].
 
     (UninterpretedBytes isBigEndian == msb) ifFalse:[
-	"swap the bytes"
-	4 to:1 by:-1 do:[:i |
-	    aBasicNewShortFloat basicAt:i put:(aStream next)
-	].
-	^ self
+        "swap the bytes"
+        4 to:1 by:-1 do:[:i |
+            aBasicNewShortFloat basicAt:i put:(aStream next)
+        ].
+        ^ self
     ].
     1 to:4 do:[:i |
-	aBasicNewShortFloat basicAt:i put:aStream next
+        aBasicNewShortFloat basicAt:i put:aStream next
     ]
 
     "not part of libboss, as this is also used by others (TIFFReader)"
 
-    "Modified: / 23-08-2006 / 16:01:52 / cg"
+    "Modified: / 21-06-2017 / 10:36:28 / cg"
 !
 
 storeBinaryIEEESingle:aFloat on:aStream