Skip to content

Commit

Permalink
CharRow: remove UpdateParent -- we never re-seat CharRows
Browse files Browse the repository at this point in the history
  • Loading branch information
DHowett committed Nov 25, 2020
1 parent 331fe14 commit d226521
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
9 changes: 0 additions & 9 deletions src/buffer/out/CharRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,3 @@ COORD CharRow::GetStorageKey(const size_t column) const noexcept
{
return { gsl::narrow<SHORT>(column), _pParent->GetId() };
}

// Routine Description:
// - Updates the pointer to the parent row (which might change if we shuffle the rows around)
// Arguments:
// - pParent - Pointer to the parent row
void CharRow::UpdateParent(ROW* const pParent)
{
_pParent = FAIL_FAST_IF_NULL(pParent);
}
2 changes: 0 additions & 2 deletions src/buffer/out/CharRow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ class CharRow final
const UnicodeStorage& GetUnicodeStorage() const noexcept;
COORD GetStorageKey(const size_t column) const noexcept;

void UpdateParent(ROW* const pParent);

friend CharRowCellReference;
friend bool operator==(const CharRow& a, const CharRow& b) noexcept;
friend class ROW;
Expand Down
3 changes: 0 additions & 3 deletions src/buffer/out/textBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,6 @@ void TextBuffer::_RefreshRowIDs(std::optional<SHORT> newRowWidth)
// Update the IDs
it.SetId(i++);

// Also update the char row parent pointers as they can get shuffled up in the rotates.
it.GetCharRow().UpdateParent(&it);

// Resize the rows in the X dimension if we have a new width
if (newRowWidth.has_value())
{
Expand Down

0 comments on commit d226521

Please sign in to comment.