]> gitweb.factorcode.org Git - factor.git/commitdiff
``swap drop`` is ``nip``.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 5 Aug 2014 17:30:07 +0000 (10:30 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 5 Aug 2014 17:31:42 +0000 (10:31 -0700)
basis/formatting/formatting.factor
basis/game/input/xinput/xinput.factor
extra/images/tga/tga.factor

index 00e4041924ff7a90f3a742364c66268b1df1a544..1aedd07afb380b8d6e487169f66a31c102e6bc1a 100644 (file)
@@ -20,7 +20,7 @@ IN: formatting
             {
                { CHAR: - [ [ 1 - ] dip remove-nth "-" prepend ] }
                { CHAR: + [ [ 1 - ] dip remove-nth "+" prepend ] }
-               [ drop swap drop ]
+               [ drop nip ]
             } case
          ] [ drop ] if
       ] when ;
index 70b5e14fa2ddb4d98cf99602822d305ad728d3ef..c51ec1e09812c66863a3d228dd9149f9be235155 100644 (file)
@@ -17,7 +17,7 @@ xinput-game-input-backend game-input-backend set-global
     65535 * >fixnum 0 65535 clamp ; inline
 MACRO: map-index-compose ( seq quot -- seq )
     '[ '[ _ execute _ ] _ compose ] map-index 1quotation ;
-    
+
 : fill-buttons ( button-bitmap -- button-array )
     10 0.0 <array> dup rot >fixnum
     { XINPUT_GAMEPAD_START
@@ -114,8 +114,8 @@ M: xinput-game-input-backend instance-id
     if ;
 
 M: xinput-game-input-backend read-controller
-    XINPUT_STATE <struct> [ XInputGetState ] keep
-    swap drop fill-controller-state ;
+    XINPUT_STATE <struct> [ XInputGetState drop ] keep
+    fill-controller-state ;
 
 M: xinput-game-input-backend calibrate-controller drop ;
 
index debf66d0f36d40d81b71e476ac2f913103548d3f..c64f4907d89e5db8c36c034b029172313a4cf069 100644 (file)
@@ -58,7 +58,7 @@ ERROR: bad-tga-unsupported ;
     read ; inline
 
 : read-color-map ( type length elt-size -- color-map )
-    pick 1 = [ 8 align 8 / * read ] [ 2drop f ] if swap drop ; inline
+    pick 1 = [ 8 align 8 / * read ] [ 2drop f ] if nip ; inline
 
 : read-image-data ( width height depth -- image-data )
     8 align 8 / * * read ; inline