Browse Source

Code formatting

Source commit: 18e93314889bfeeae434f110b8aa57cfc3064360
Martin Prikryl 2 years ago
parent
commit
23f153a0ae
1 changed files with 6 additions and 3 deletions
  1. 6 3
      source/forms/Progress.cpp

+ 6 - 3
source/forms/Progress.cpp

@@ -350,7 +350,8 @@ void __fastcall TProgressForm::UpdateControls()
     if (FData.TotalSizeSet)
     {
       UnicodeString TimeLeftCaption;
-      if (CanShowTimeEstimate(FData.StartTime))
+      bool CanShow = CanShowTimeEstimate(FData.StartTime);
+      if (CanShow)
       {
         TDateTime TimeLeft;
         if (SynchronizeProgress != NULL)
@@ -369,9 +370,11 @@ void __fastcall TProgressForm::UpdateControls()
       }
       TimeLeftLabel->Caption = TimeLeftCaption;
     }
-    TimeElapsedLabel->Caption = FormatDateTimeSpan(Configuration->TimeFormat, FData.TimeElapsed());
+    TDateTime Elapsed = FData.TimeElapsed();
+    TimeElapsedLabel->Caption = FormatDateTimeSpan(Configuration->TimeFormat, Elapsed);
     BytesTransferredLabel->Caption = FormatBytes(FData.TotalTransferred);
-    CPSLabel->Caption = FORMAT(L"%s/s", (FormatBytes(FData.CPS())));
+    int CPS = FData.CPS();
+    CPSLabel->Caption = FORMAT(L"%s/s", (FormatBytes(CPS)));
     FileProgress->Position = FData.TransferProgress();
     FileProgress->Hint = FORMAT(L"%d%%", (FileProgress->Position));
   }