From 91143ed4b34a1a5658bd64c20406d6a57a73120f Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Fri, 1 Oct 2010 21:39:35 +0800 Subject: [PATCH] Simplify macro As a bonus it's also optimized. --- src/getopt.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/getopt.erl b/src/getopt.erl index f303ab0..454a96e 100644 --- a/src/getopt.erl +++ b/src/getopt.erl @@ -25,7 +25,7 @@ -define(OPT_ARG, 4). -define(OPT_HELP, 5). --define(IS_OPT_SPEC(Opt), (is_tuple(Opt) andalso (size(Opt) =:= ?OPT_HELP))). +-define(IS_OPT_SPEC(Opt), (tuple_size(Opt) =:= ?OPT_HELP)). %% Atom indicating the data type that an argument can be converted to.