Recent

Author Topic: [CLOSED] Code cleanup at nested procedures SaveState  (Read 1151 times)

lagprogramming

  • Sr. Member
  • ****
  • Posts: 406
[CLOSED] Code cleanup at nested procedures SaveState
« on: December 15, 2023, 01:29:05 pm »
Code: Pascal  [Select][+][-]
  1.   procedure SaveState;
  2.   begin
  3.     if DCIndex <> 0 then exit;
  4.     DCIndex := SaveDC(DC);
  5.   end;
  The above procedure can be found nested inside procedure TWin32ThemeServices.DrawText, function TCanvas.TextExtent and procedure TCanvas.TextRect. Before calling SaveState each time DCIndex is set to 0 which makes the line "if DCIndex <> 0 then exit;" useless.
The following patch removes the line from all three nested procedures.
« Last Edit: December 16, 2023, 10:03:13 am by lagprogramming »


 

TinyPortal © 2005-2018