aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/src/dbg_wx_winman.erl
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2010-02-07 21:15:42 +0200
committerRaimo Niskanen <[email protected]>2010-06-07 13:44:27 +0200
commit9e962d71c6320e224025f86070f4f9421b51fea0 (patch)
tree29e4814fb8df96b8ed2ae5dab63ce34ec24a1158 /lib/debugger/src/dbg_wx_winman.erl
parent3647defb6f32d471355017967bdebb83b5c6224c (diff)
downloadotp-9e962d71c6320e224025f86070f4f9421b51fea0.tar.gz
otp-9e962d71c6320e224025f86070f4f9421b51fea0.tar.bz2
otp-9e962d71c6320e224025f86070f4f9421b51fea0.zip
debugger: Clean up as suggested by tidier
Diffstat (limited to 'lib/debugger/src/dbg_wx_winman.erl')
-rwxr-xr-xlib/debugger/src/dbg_wx_winman.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/debugger/src/dbg_wx_winman.erl b/lib/debugger/src/dbg_wx_winman.erl
index 1daabe3435..d0ddfeb51a 100755
--- a/lib/debugger/src/dbg_wx_winman.erl
+++ b/lib/debugger/src/dbg_wx_winman.erl
@@ -118,9 +118,9 @@ init([]) ->
{ok, #state{}}.
handle_call({is_started, Title}, _From, State) ->
- Reply = case lists:keysearch(Title, #win.title, State#state.wins) of
- {value, Win} -> {true, Win#win.win};
- false -> false
+ Reply = case lists:keyfind(Title, #win.title, State#state.wins) of
+ false -> false;
+ Win -> {true, Win#win.win}
end,
{reply, Reply, State}.
@@ -132,8 +132,8 @@ handle_cast({insert, Pid, Title, Win}, State) ->
handle_cast({clear_process, Title}, State) ->
OldWins = State#state.wins,
- Wins = case lists:keysearch(Title, #win.title, OldWins) of
- {value, #win{owner=Pid}} ->
+ Wins = case lists:keyfind(Title, #win.title, OldWins) of
+ #win{owner=Pid} ->
Msg = {dbg_ui_winman, destroy},
Pid ! Msg,
lists:keydelete(Title, #win.title, OldWins);
@@ -145,7 +145,7 @@ handle_cast({clear_process, Title}, State) ->
handle_info({'EXIT', Pid, _Reason}, State) ->
[Mon | _Wins] = State#state.wins,
if
- Pid==Mon#win.owner -> {stop, normal, State};
+ Pid =:= Mon#win.owner -> {stop, normal, State};
true ->
Wins2 = lists:keydelete(Pid, #win.owner, State#state.wins),
inform_all(Wins2),