Forum > LCL

[CLOSED] Code cleanup at nested procedures SaveState



--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  procedure SaveState;  begin    if DCIndex <> 0 then exit;    DCIndex := SaveDC(DC);  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.

Posted to


[0] Message Index

Go to full version