Remove useless compile/3

Its case statement is noop.
This commit is contained in:
David Kubecka 2015-03-23 21:19:44 +01:00
parent eb79622903
commit f61ca47b23

View file

@ -129,21 +129,10 @@ remove_common_path1([Part | RestFilename], [Part | RestPath]) ->
remove_common_path1(FilenameParts, _) ->
filename:join(FilenameParts).
compile(Unit, Config, CompileFn) ->
case CompileFn(Unit, Config) of
ok ->
ok;
skipped ->
skipped;
Error ->
Error
end.
compile_each([], _Config, _CompileFn) ->
ok;
compile_each([Unit | Rest], Config, CompileFn) ->
case compile(Unit, Config, CompileFn) of
case CompileFn(Unit, Config) of
ok ->
?CONSOLE("Compiled ~s\n", [unit_source(Unit)]);
{ok, Warnings} ->
@ -224,7 +213,7 @@ compile_worker(QueuePid, Config, CompileFn) ->
QueuePid ! {next, self()},
receive
{compile, Source} ->
case catch(compile(Source, Config, CompileFn)) of
case catch(CompileFn(Source, Config)) of
{ok, Ws} ->
QueuePid ! {compiled, Source, Ws},
compile_worker(QueuePid, Config, CompileFn);