From 1524c43f7d5cd35011cfdee4036cb39ae7fa4b2a Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 4 Dec 2016 15:19:01 +0100 Subject: [PATCH] #97, replace usage of branches-bloated-findCaption with the simpler version --- src/ce_gdb.pas | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ce_gdb.pas b/src/ce_gdb.pas index 5473a42c..580e59cc 100644 --- a/src/ce_gdb.pas +++ b/src/ce_gdb.pas @@ -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);