Skip to content

Commit

Permalink
minor code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Feb 7, 2022
1 parent 9a95932 commit ef60583
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/orm/mormot.orm.core.pas
Expand Up @@ -9185,9 +9185,8 @@ constructor TOrmProperties.Create(aTable: TOrmClass);
begin
fRecordManySourceProp := Fields.ByRawUtf8Name('Source') as TOrmPropInfoRttiInstance;
if fRecordManySourceProp = nil then
raise EModelException.CreateUtf8('% expects a SOURCE field', [Table])
else
fRecordManyDestProp := Fields.ByRawUtf8Name('Dest') as TOrmPropInfoRttiInstance;
raise EModelException.CreateUtf8('% expects a SOURCE field', [Table]);
fRecordManyDestProp := Fields.ByRawUtf8Name('Dest') as TOrmPropInfoRttiInstance;
if fRecordManyDestProp = nil then
raise EModelException.CreateUtf8('% expects a DEST field', [Table]);
end;
Expand Down
2 changes: 1 addition & 1 deletion src/orm/mormot.orm.storage.pas
Expand Up @@ -3113,7 +3113,7 @@ procedure TRestStorageInMemory.ComputeStateAfterLoad(
'Json', 'Binary');
var
f: PtrInt;
dup: integer;
dup: integer; // should be an integer and not a PtrInt for ForceRehash(@dup)
dupfield: RawUtf8;
timer: TPrecisionTimer;
begin
Expand Down
2 changes: 1 addition & 1 deletion src/soa/mormot.soa.codegen.pas
Expand Up @@ -1226,7 +1226,7 @@ function TWrapperContext.Context: variant;
'time', NowToString,
'year', CurrentYear,
'mORMotVersion', SYNOPSE_FRAMEWORK_VERSION,
'Executable', VarStringOrNull(StringToUtf8(Executable.Version.DetailedOrVoid)),
'Executable', VarStringOrNull(StringToUtf8(Executable.Version.DetailedOrVoid)),
'exeInfo', Executable.Version.VersionInfo,
'exeName', Executable.ProgramName,
'hasorm', fORM.Count > 0,
Expand Down

0 comments on commit ef60583

Please sign in to comment.