[LayoutNG] Avoid copying a shelf in loop of NGExclusionSpace::Add.

Every pass of the ExclusionSpace::Add loop invoked a copy of a shelf
optimistically. This isn't needed for every pass, and only needed for
the single pass where we are actually going to add the shelf.

(there is potential to remove additional copies, but we'll see if that
is needed later).

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ia7cdafc71bf0ea0c657763957ef8c5e0e0953382
Bug: 635619
Reviewed-on: https://chromium-review.googlesource.com/1140521
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576192}
1 file changed