]> gitweb.factorcode.org Git - factor.git/commitdiff
cleanup some lint warnings.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 19 Apr 2012 00:46:01 +0000 (17:46 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 19 Apr 2012 00:46:01 +0000 (17:46 -0700)
basis/stack-checker/inlining/inlining.factor
basis/ui/commands/commands.factor
basis/ui/gadgets/packs/packs.factor
basis/ui/pens/polygon/polygon.factor
basis/ui/tools/browser/popups/popups.factor
basis/ui/ui.factor
core/effects/effects.factor
core/sequences/sequences.factor
extra/benchmark/dispatch2/dispatch2.factor
extra/ctags/etags/etags.factor

index 697e66840971f769d700096ad81d0d1603b97959..100201d545358dbcdb7e4769507b794cb5d0aa17 100644 (file)
@@ -65,7 +65,7 @@ SYMBOL: enter-out
 
 : check-return ( word label -- )
     2dup
-    [ stack-effect effect-height ]
+    [ stack-height ]
     [ entry-stack-height current-stack-height swap - ]
     bi*
     = [ 2drop ] [
index fe9bc19c1eb89075c0010c6dd5e2e2e33db7ecd3..877f4b32c7ec4d626f5091e0af1fd8b4467f7525 100644 (file)
@@ -42,7 +42,7 @@ GENERIC: command-word ( command -- word )
     ] H{ } make-assoc ;
 
 : update-gestures ( class -- )
-    dup command-gestures "gestures" set-word-prop ;
+    dup command-gestures set-gestures ;
 
 : define-command-map ( class group blurb pairs -- )
     <command-map>
@@ -79,4 +79,4 @@ M: word invoke-command ( target command -- )
 
 M: word command-word ;
 
-M: f invoke-command ( target command -- ) 2drop ;
\ No newline at end of file
+M: f invoke-command ( target command -- ) 2drop ;
index 09a0e222d8bf9d34af10a0024a0d9f836e31c9a4..b50187904bc851eee9b582f9719606664f7585b8 100644 (file)
@@ -39,7 +39,7 @@ TUPLE: pack < gadget
 
 : round-dims ( seq -- newseq )
     [ { 0 0 } ] dip
-    [ swap v- dup [ ceiling ] map [ swap v- ] keep ] map
+    [ swap v- dup vceiling [ swap v- ] keep ] map
     nip ;
 
 PRIVATE>
index 0907cb6867c316d4d48b72d8b1661ced800c2702..2f84d77f1c8754e1452ff7f774163bb48dbe45a0 100644 (file)
@@ -35,5 +35,5 @@ M: polygon draw-interior
     tri ;
 
 : <polygon-gadget> ( color points -- gadget )
-    [ <polygon> ] [ { 0 0 } [ vmax ] reduce ] bi
+    [ <polygon> ] [ max-dim ] bi
     [ <gadget> ] 2dip [ >>interior ] [ >>dim ] bi* ;
index b5ceda461efa24824e853f22e61b2085ecc0c68b..411321bf85327703b69e701fdbb587dd79508d7d 100644 (file)
@@ -44,7 +44,7 @@ SLOT: model
 
 : show-links-popup ( browser-gadget quot title -- )
     [ dup model>> ] 2dip <links-popup>
-    [ hand-loc get { 0 0 } <rect> show-glass ] [ request-focus ] bi ; inline
+    [ hand-loc get point>rect show-glass ] [ request-focus ] bi ; inline
 
 : com-show-outgoing-links ( browser-gadget -- )
     [ uses ] "Outgoing links" show-links-popup ;
index 4917b3697b6600ee1b42079e64aaee9c3bed8d6d..766d128c1fa314ff03407c0f6a310ab30b5efdfd 100644 (file)
@@ -171,7 +171,7 @@ PRIVATE>
     call( -- ) notify-ui-thread start-ui-thread ;
 
 : ?attributes ( gadget title/attributes -- attributes )
-    dup string? [ world-attributes new swap >>title ] [ clone ] if
+    dup string? [ <world-attributes> swap >>title ] [ clone ] if
     swap [ [ [ 1array ] [ f ] if* ] curry unless* ] curry change-gadgets ;
 
 PRIVATE>
index 785a5d21f2ee102a94a4e5f01d7359776dcbd2a1..650e6b79c5502d3da1ffa647202a45ce8520c01c 100644 (file)
@@ -99,7 +99,7 @@ M: effect clone
     [ in>> clone ] [ out>> clone ] bi <effect> ;
 
 : stack-height ( word -- n )
-    stack-effect effect-height ;
+    stack-effect effect-height ; inline
 
 : shuffle-mapping ( effect -- mapping )
     [ out>> ] [ in>> ] bi [ index ] curry map ;
index b0dc63fa982d8729e5c1e01ae45b673316794d45..79847b0abf98604bf89f34eb53d125950ef1c220 100644 (file)
@@ -664,8 +664,7 @@ PRIVATE>
 
 : prefix ( seq elt -- newseq )
     over [ over length 1 + ] dip [
-        [ 0 swap set-nth-unsafe ] keep
-        [ 1 swap copy ] keep
+        (1sequence) [ 1 swap copy ] keep
     ] new-like ;
 
 : suffix ( seq elt -- newseq )
index 7db583d42a397bcc6fe97c0316c3afd305739945..60a37e95d910b3f56cab746dc57cc7402b36d9b2 100644 (file)
@@ -27,6 +27,6 @@ IN: benchmark.dispatch2
 
 : dispatch-test ( -- )
     1000000 sequences
-    [ [ 0 swap nth don't-flush-me ] each ] curry times ;
+    [ [ first don't-flush-me ] each ] curry times ;
 
 MAIN: dispatch-test
index b8177653aefd83192cd1602f3853f749cb9e8bae..baee3c4911603c72d3f3814fd7d53bace1ebbed8 100644 (file)
@@ -43,9 +43,6 @@ IN: ctags.etags
     1 - lines>bytes number>string %
   ] "" make ;
 
-: etag-length ( vector -- n )
-  0 [ length + ] reduce ;
-
 : (etag-header) ( n path -- str )
   [
     %
@@ -63,8 +60,8 @@ IN: ctags.etags
       [ first file>lines ]
       [ second ] bi
       [ etag ] with map
-      dup etag-length
-    ] keep first 
+      dup sum-lengths
+    ] keep first
     etag-header append
   ] each ;