diff options
author | Tuncer Ayaz <[email protected]> | 2011-08-19 17:34:48 +0200 |
---|---|---|
committer | Tuncer Ayaz <[email protected]> | 2011-09-08 14:02:18 +0200 |
commit | 78c109da0a33108a72ea580b8ba4c01aa32dbe2c (patch) | |
tree | 91e2c8359e88b50f47305d6d2022060526201463 | |
parent | 5d4aadda5f63b6734b98dedf681598f065117b7a (diff) | |
download | otp-78c109da0a33108a72ea580b8ba4c01aa32dbe2c.tar.gz otp-78c109da0a33108a72ea580b8ba4c01aa32dbe2c.tar.bz2 otp-78c109da0a33108a72ea580b8ba4c01aa32dbe2c.zip |
leex: optimize werror/1
-rw-r--r-- | lib/parsetools/src/leex.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/parsetools/src/leex.erl b/lib/parsetools/src/leex.erl index 3e226229f8..cdf20461d9 100644 --- a/lib/parsetools/src/leex.erl +++ b/lib/parsetools/src/leex.erl @@ -282,8 +282,8 @@ do_error_return(St, Es, Ws) -> end. werror(St) -> - member(warnings_as_errors, St#leex.opts) - andalso length(St#leex.warnings) > 0. + St#leex.warnings =/= [] + andalso member(warnings_as_errors, St#leex.opts). pack_errors([{File,_} | _] = Es) -> [{File, flatmap(fun({_,E}) -> [E] end, sort(Es))}]; |