浏览代码

Inline to avoid copies

Brandon Thetford 1 年之前
父节点
当前提交
0fb31d19f7
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      Terminal.Gui/Drawing/LineCanvas.cs

+ 1 - 3
Terminal.Gui/Drawing/LineCanvas.cs

@@ -82,9 +82,7 @@ public class LineCanvas : IDisposable
 
                 for (var i = 1; i < _lines.Count; i++)
                 {
-                    StraightLine line = _lines [i];
-                    Rect lineBounds = line.Bounds;
-                    bounds = Rect.Union (bounds, lineBounds);
+                    bounds = Rectangle.Union (bounds, _lines [i].Bounds);
                 }
 
                 if (bounds.Width == 0)