Ignore:
Timestamp:
Mar 8, 2021, 9:23:32 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/StringTables.pas

    r286 r300  
    2222    function Search(const Content: string; var Handle, Index: integer): boolean;
    2323  end;
     24
    2425
    2526implementation
     
    7071  s: string;
    7172begin
    72   if Index < 0 then
     73  if Index < 0 then begin
    7374    if Handle < 0 then begin
    7475      Result := '';
     
    8687      end;
    8788      Result := S;
    88     end else
    89     if (Handle + Index + 1) >= Lines.Count then begin
    90       Result := '';
    91       Exit;
    92     end else Result := Lines[Handle + Index + 1];
     89    end;
     90  end else
     91  if (Handle + Index + 1) >= Lines.Count then begin
     92    Result := '';
     93    Exit;
     94  end else Result := Lines[Handle + Index + 1];
    9395  while (Result <> '') and ((Result[1] = ' ') or (Result[1] = #9)) do
    9496    Delete(Result, 1, 1);
     
    104106begin
    105107  Handle := GetHandle(Item);
    106   if Handle >= 0 then
    107     Result := LookupByHandle(Handle, Index)
    108   else
    109     Result := '';
    110   if Result = '' then
    111     if Index < 0 then
    112       Result := Format('[%s]', [Item])
    113     else
    114       Result := Format('[%s %d]', [Item, Index])
     108  if Handle >= 0 then Result := LookupByHandle(Handle, Index)
     109    else Result := '';
     110  if Result = '' then begin
     111    if Index < 0 then Result := Format('[%s]', [Item])
     112      else Result := Format('[%s %d]', [Item, Index]);
     113  end;
    115114end;
    116115
     
    153152    begin
    154153      result := false;
    155       exit
     154      exit;
    156155    end;
    157156    if Copy(Lines[h + i + 1], 1, 1) = '#' then
    158157    begin
    159158      h := h + i + 1;
    160       i := -1
     159      i := -1;
    161160    end;
    162161    if (h >= 0) and not ((Length(Lines[h + i + 1]) > 0) and (Lines[h + i + 1][1] in ['#', ':', ';'])) and
Note: See TracChangeset for help on using the changeset viewer.