Skip to content

Commit

Permalink
RomanYankovsky#258 minor tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
jbontes committed Oct 19, 2017
1 parent 1e3101d commit 3f8415e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/DelphiAST.Classes.pas
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ TOperatorInfo = record

TOperators = class
strict private
class function GetItem(Typ: TSyntaxNodeType): TOperatorInfo; static;
class function GetItem(Typ: TSyntaxNodeType): TOperatorInfo; inline; static;
public
class function IsOpName(Typ: TSyntaxNodeType): Boolean;
class property Items[Typ: TSyntaxNodeType]: TOperatorInfo read GetItem; default;
Expand Down Expand Up @@ -172,8 +172,8 @@ TOperators = class
class function TOperators.GetItem(Typ: TSyntaxNodeType): TOperatorInfo;
begin
Assert(Typ = OperatorsInfo[Typ].Typ);
if (Typ in [ntAddr..ntIs]) then Exit(OperatorsInfo[Typ])
else Assert(false);
Assert(Typ in [ntAddr..ntIs]);
Result:= OperatorsInfo[Typ]; //don't use exit in inline routines.
end;

class function TOperators.IsOpName(Typ: TSyntaxNodeType): Boolean;
Expand Down

0 comments on commit 3f8415e

Please sign in to comment.