]> gitweb.factorcode.org Git - factor.git/commitdiff
cocoa.messages: simplify (objc-class).
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 12 Feb 2017 04:58:25 +0000 (20:58 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 12 Feb 2017 04:58:25 +0000 (20:58 -0800)
basis/cocoa/messages/messages.factor

index 0324565e9677bc971e2bdacd03cd448b26917719..cd0e932f2a1087868776b364748066ff32151254 100644 (file)
@@ -94,12 +94,12 @@ SYMBOL: class-init-hooks
 class-init-hooks [ H{ } clone ] initialize
 
 : (objc-class) ( name word -- class )
-    2dup execute dup [ 2nip ] [
-        drop over class-init-hooks get at [ call( -- ) ] when*
-        2dup execute dup [ 2nip ] [
-            2drop "No such class: " prepend throw
-        ] if
-    ] if ; inline
+    2dup execute [ 2nip ] [
+        over class-init-hooks get at [ call( -- ) ] when*
+        2dup execute [ 2nip ] [
+            drop "No such class: " prepend throw
+        ] if*
+    ] if* ; inline
 
 : objc-class ( string -- class )
     \ objc_getClass (objc-class) ;