]> gitweb.factorcode.org Git - factor.git/commitdiff
no need to clone empty byte-array.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 22 Jan 2017 23:41:07 +0000 (15:41 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 22 Jan 2017 23:41:07 +0000 (15:41 -0800)
basis/db/postgresql/lib/lib.factor
extra/checksums/process/process.factor
extra/images/png/png.factor

index 701e0f96638432e3ce4575813a52b75c8ecbf977..d4ad6dd18a8a653aa360c4fef1991736b8558a0b 100644 (file)
@@ -148,7 +148,7 @@ M: postgresql-malloc-destructor dispose ( obj -- )
             ] with-out-parameters memory>byte-array
         ] with-destructors
     ] [
-        drop pq-get-is-null nip [ f ] [ B{ } clone ] if
+        drop pq-get-is-null nip f B{ } ?
     ] if ;
 
 : postgresql-column-typed ( handle row column type -- obj )
index 514e6988d4ec8c24d9b4b3b97aea1d148d465930..d4fd24b70a6150738e2bda9a7592319506abe8d2 100644 (file)
@@ -30,6 +30,6 @@ M: process-state get-checksum
                 [ out>> dispose ] keep
                 stream-contents trim-hash hex-string>bytes
             ] with-disposal
-        ] [ B{ } clone ] if*
+        ] [ B{ } ] if*
         [ >>result ] keep
     ] unless* nip ;
index d08d0eeeb18c0250a48fed409cb3c757cfc928f9..918ea6885858740018af271c0ce92f622559d220 100644 (file)
@@ -230,7 +230,7 @@ ERROR: bad-filter n ;
     loading-png width>> pass adam7-subimage-width :> width
 
     height width * zero? [
-        B{ } clone
+        B{ }
     ] [
         byte-reader loading-png width height read-scanlines
     ] if ;