Permalink
Browse files

Code cosmetic: use IfThen() in some places for having less code

  • Loading branch information...
ansgarbecker committed Dec 15, 2018
1 parent 0a69d02 commit f3dc05de7b0c5153728a87744077c1e05e4407f9
Showing with 2 additions and 8 deletions.
  1. +1 −4 source/dbconnection.pas
  2. +1 −4 source/main.pas
@@ -6613,10 +6613,7 @@ procedure TDBQuery.SetCol(Column: Integer; NewText: String; Null: Boolean; IsFun
end;
FCurrentUpdateRow[Column].NewIsNull := Null;
FCurrentUpdateRow[Column].NewIsFunction := IsFunction;
if Null then
FCurrentUpdateRow[Column].NewText := ''
else
FCurrentUpdateRow[Column].NewText := NewText;
FCurrentUpdateRow[Column].NewText := IfThen(Null, '', NewText);
FCurrentUpdateRow[Column].Modified := (FCurrentUpdateRow[Column].NewText <> FCurrentUpdateRow[Column].OldText) or
(FCurrentUpdateRow[Column].NewIsNull <> FCurrentUpdateRow[Column].OldIsNull) or
(FCurrentUpdateRow[Column].NewIsFunction <> FCurrentUpdateRow[Column].OldIsFunction)
@@ -11482,10 +11482,7 @@ procedure TMainForm.OperationRunning(Runs: Boolean);
if actCancelOperation.Enabled <> Runs then begin
actCancelOperation.ImageIndex := 159;
actCancelOperation.Enabled := Runs;
if Runs then
FOperationTicker := GetTickCount
else
FOperationTicker := 0;
FOperationTicker := IfThen(Runs, GetTickCount, 0);
Application.ProcessMessages;
end else if Runs then begin
if (GetTickCount-FOperationTicker) > 250 then begin

0 comments on commit f3dc05d

Please sign in to comment.