#97, replace usage of branches-bloated-findCaption with the simpler version

This commit is contained in:
Basile Burg 2016-12-04 15:19:01 +01:00
parent 2ebcfcc4ce
commit 1524c43f7d
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 3 additions and 5 deletions

View File

@ -1776,10 +1776,9 @@ procedure TCEGdbWidget.interpretJson;
procedure selectAsmInstr;
var
itm: TListItem;
itm: TListItem = nil;
begin
itm := lstAsm.FindCaption(0, fLastOffset, false, true, false);
if itm.isNotNil then
if lstAsm.items.findCaption(fLastOffset, itm) then
begin
itm.Selected:=true;
itm.MakeVisible(false);
@ -1839,8 +1838,7 @@ begin
begin
if fJson.findObject('wpt', obj) and obj.findAny('exp', val) then
begin
k := lstVariables.FindCaption(0, val.AsString, false, true, false);
if k.isNotNil then
if lstVariables.items.findCaption(val.AsString, k) then
begin
lstVariables.ItemIndex:=k.index;
k.MakeVisible(false);