Skip to content

Commit

Permalink
changed TSynLog.Log(TypeInfo()) to specify the value as const
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Apr 12, 2018
1 parent 09435dc commit 0fb89cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions SynLog.pas
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ TSynLogFile = class;
// - TSynLog will handle enumerations and dynamic array; TSQLLog will be
// able to write TObject/TSQLRecord and sets content as JSON
procedure Log(Level: TSynLogInfo; const aName: RawUTF8;
aTypeInfo: pointer; var aValue; Instance: TObject=nil); overload;
aTypeInfo: pointer; const aValue; Instance: TObject=nil); overload;
/// call this method to add the caller address to the log at the specified level
// - if the debugging info is available from TSynMapFile, will log the
// unit name, associated symbol and source code line
Expand Down Expand Up @@ -784,7 +784,7 @@ TSynLog = class(TObject, ISynLog)
procedure LogInternal(Level: TSynLogInfo; const Text: RawUTF8;
Instance: TObject; TextTruncateAtLength: integer); overload;
procedure LogInternal(Level: TSynLogInfo; const aName: RawUTF8;
aTypeInfo: pointer; var aValue; Instance: TObject=nil); overload;
aTypeInfo: pointer; const aValue; Instance: TObject); overload;
// any call to this method MUST call LogTrailerUnLock
function LogHeaderLock(Level: TSynLogInfo; AlreadyLocked: boolean): boolean;
procedure LogTrailerUnLock(Level: TSynLogInfo); {$ifdef HASINLINENOTX86}inline;{$endif}
Expand Down Expand Up @@ -977,7 +977,7 @@ TSynLog = class(TObject, ISynLog)
// - TSQLLog from mORMot.pas unit will be able to write
// TObject/TSQLRecord and sets content as JSON
procedure Log(Level: TSynLogInfo; const aName: RawUTF8;
aTypeInfo: pointer; var aValue; Instance: TObject=nil); overload;
aTypeInfo: pointer; const aValue; Instance: TObject=nil); overload;
/// call this method to add the caller address to the log at the specified level
// - if the debugging info is available from TSynMapFile, will log the
// unit name, associated symbol and source code line
Expand Down Expand Up @@ -4027,7 +4027,7 @@ procedure TSynLog.Log(Level: TSynLogInfo; aInstance: TObject);
end;

procedure TSynLog.Log(Level: TSynLogInfo; const aName: RawUTF8;
aTypeInfo: pointer; var aValue; Instance: TObject=nil);
aTypeInfo: pointer; const aValue; Instance: TObject=nil);
begin
if (self<>nil) and (Level in fFamily.fLevel) then
LogInternal(Level,aName,aTypeInfo,aValue,Instance);
Expand Down Expand Up @@ -4426,7 +4426,7 @@ procedure TSynLog.LogInternal(Level: TSynLogInfo; const Text: RawUTF8;
end;

procedure TSynLog.LogInternal(Level: TSynLogInfo; const aName: RawUTF8;
aTypeInfo: pointer; var aValue; Instance: TObject=nil);
aTypeInfo: pointer; const aValue; Instance: TObject);
begin
if LogHeaderLock(Level,false) then
try
Expand Down
2 changes: 1 addition & 1 deletion SynopseCommit.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'1.18.4519'
'1.18.4520'

0 comments on commit 0fb89cf

Please sign in to comment.