diff --git a/Src/Myc.Core.Notifier.pas b/Src/Myc.Core.Notifier.pas index 2fcbf7c..1388a29 100644 --- a/Src/Myc.Core.Notifier.pas +++ b/Src/Myc.Core.Notifier.pas @@ -69,7 +69,7 @@ begin Assert(IsLocked); if not Assigned(Receiver) then - exit( nil ); + exit(nil); Item := AllocItem; Item.Receiver := Receiver; @@ -185,16 +185,16 @@ begin if (Tag = nil) or (FList = nil) then exit; - {$ifdef DEBUG} +{$ifdef DEBUG} Item := FList; - while Item<>nil do + while Item <> nil do begin if Item = Tag then break; Item := Item.Next; end; - Assert( Item <> nil, 'Receiver not advised' ); - {$endif} + Assert(Item <> nil, 'Receiver not advised'); +{$endif} if FList = nil then exit; diff --git a/Src/Myc.Core.Signals.pas b/Src/Myc.Core.Signals.pas index bcf761a..87021ef 100644 --- a/Src/Myc.Core.Signals.pas +++ b/Src/Myc.Core.Signals.pas @@ -405,7 +405,7 @@ end; class function TMycFlag.CreateDirty: TFlag.IFlag; begin // Factory method to create a new TMycFlag instance. - Result := TMycFlag.Create( true ); + Result := TMycFlag.Create(true); end; destructor TMycFlag.Destroy; @@ -505,7 +505,7 @@ end; constructor TMycObserverFlag.Create(const ASignal: TSignal.ISignal); begin - inherited Create( false ); + inherited Create(false); FSignal := ASignal; end; diff --git a/Src/Myc.Signals.pas b/Src/Myc.Signals.pas index 62b20ec..1b2e2e2 100644 --- a/Src/Myc.Signals.pas +++ b/Src/Myc.Signals.pas @@ -363,7 +363,7 @@ end; class function TFlag.CreateFlag(Init: Boolean = false): TFlag; begin - Result := TMycFlag.Create( Init ); + Result := TMycFlag.Create(Init); end; class function TFlag.CreateObserver(const Signal: TSignal): TFlag; diff --git a/Src/Myc.Test.Core.Lazy.pas b/Src/Myc.Test.Core.Lazy.pas index 95dd8c9..7af1743 100644 --- a/Src/Myc.Test.Core.Lazy.pas +++ b/Src/Myc.Test.Core.Lazy.pas @@ -411,7 +411,7 @@ var expectedValue: Integer; procExecuted: Boolean; begin - sourceDirty := TFlag.CreateFlag( true ); + sourceDirty := TFlag.CreateFlag(true); Assert.IsTrue(sourceDirty.State.IsSet, 'SourceDirty should be initially set for this test scenario'); expectedValue := 70; procExecuted := False; diff --git a/Src/Myc.Test.Signals.Dirty.pas b/Src/Myc.Test.Signals.Dirty.pas index 754c9e8..b8fa49e 100644 --- a/Src/Myc.Test.Signals.Dirty.pas +++ b/Src/Myc.Test.Signals.Dirty.pas @@ -105,7 +105,7 @@ end; function TTestMycDirtyFlag.CreateAndPrepareDirtyFlag(StartDirty: Boolean = True): TFlag.IFlag; begin - Result := TFlag.CreateFlag( true ); // Initially dirty + Result := TFlag.CreateFlag(true); // Initially dirty if not StartDirty then Result.Reset; // Reset to make it clean Assert.AreEqual(StartDirty, Result.State.IsSet, 'CreateAndPrepareDirtyFlag initial state incorrect.'); @@ -127,9 +127,9 @@ procedure TTestMycDirtyFlag.TestCreate_InitialStateIsDirty; var dirtyFlag: TFlag.IFlag; begin - dirtyFlag := TFlag.CreateFlag( true ); + dirtyFlag := TFlag.CreateFlag(true); Assert.IsTrue(dirtyFlag.State.IsSet, 'Newly created dirty flag should be IsSet.'); - dirtyFlag := TFlag.CreateFlag( false ); + dirtyFlag := TFlag.CreateFlag(false); Assert.IsFalse(dirtyFlag.State.IsSet, 'Newly created dirty flag should not be IsSet.'); end;