Skip to content

Commit

Permalink
Use constant instead of literal.
Browse files Browse the repository at this point in the history
  • Loading branch information
horacekj committed Jan 17, 2023
1 parent 412a69a commit 61cbfdb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ModelovyCas.pas
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ constructor TModCas.Create();

procedure TModCas.LoadData(var ini: TMemIniFile);
begin
Self.fspeed := ini.ReadFloat('ModCas', 'speed', 5);
Self.dateTime := StrToTime(ini.ReadString('ModCas', 'cas', '00:00:00'));
Self.fused := ini.ReadBool('ModCas', 'used', true);
Self.fspeed := ini.ReadFloat(_INI_SECTION, 'speed', 5);
Self.dateTime := StrToTime(ini.ReadString(_INI_SECTION, 'cas', '00:00:00'));
Self.fused := ini.ReadBool(_INI_SECTION, 'used', true);
end;

procedure TModCas.SaveData(var ini: TMemIniFile);
begin
ini.WriteString('ModCas', 'speed', Self.strSpeed);
ini.WriteString('ModCas', 'cas', TimeToStr(Self.time));
ini.WriteBool('ModCas', 'used', Self.used);
ini.WriteString(_INI_SECTION, 'speed', Self.strSpeed);
ini.WriteString(_INI_SECTION, 'cas', TimeToStr(Self.time));
ini.WriteBool(_INI_SECTION, 'used', Self.used);
end;

/// /////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 61cbfdb

Please sign in to comment.