Skip to content

Commit

Permalink
Minor optimization in item lookup map usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Lpsd committed Jan 17, 2025
1 parent 42cdfd4 commit c80bb0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Client/gui/CGUIGridLayout_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ SGridCellItem* CGUIGridLayout_Impl::GetCell(const int column, const int row) con
SGridCellItem* CGUIGridLayout_Impl::GetCell(const CGUIElement* item) const
{
int id = m_items.count(item) ? m_items.at(item) : 0;
return m_cells.count(id) ? m_cells.at(id) : nullptr;
return id == 0 ? nullptr : m_cells.at(id);
}

std::vector<SGridCellItem*> CGUIGridLayout_Impl::GetCellsInColumn(const int column)
Expand Down

0 comments on commit c80bb0c

Please sign in to comment.