reduce scope of variable (remove unneeded calc)

This commit is contained in:
Antony Corbett
2023-02-12 14:06:55 +00:00
parent 30bd7420e2
commit 24beea80c7
+5 -4
View File
@@ -168,12 +168,13 @@ namespace QuestPDF.Elements.Table
if (!commands.Any())
return commands;
var tableHeight = commands.Max(cell => cell.Offset.Y + cell.Size.Height);
if (ExtendLastCellsToTableBottom)
{
var tableHeight = commands.Max(cell => cell.Offset.Y + cell.Size.Height);
AdjustLastCellSizes(tableHeight, commands);
}
return commands;
static float[] GetColumnLeftOffsets(IList<TableColumnDefinition> columns)