fpexif: Adapt to better work in Delphi.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7908 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-11-29 13:58:23 +00:00
parent cef2fbba3b
commit 5979de2a61
19 changed files with 500 additions and 44 deletions

View File

@@ -247,13 +247,17 @@ var
idx: Integer;
begin
if ATag = nil then
exit(-1);
begin
Result := -1;
exit;
end;
idx := IndexOfTagID(ATag.TagID);
if idx <> -1 then begin
// Replace existing tag
FTagList.Delete(idx);
FTagList.Insert(idx, ATag);
Result := idx;
end else
// Add the new tag
Result := FTagList.Add(ATag);