LibGUI: Remove Model::sibling() since it's the same as index()

... I'm not sure what the idea was here, but since these functions do
the same thing, let's only have index().
This commit is contained in:
Andreas Kling 2020-08-13 16:07:58 +02:00
parent fe19cf0ff2
commit 4088beb8eb
Notes: sideshowbarker 2024-07-19 03:40:21 +09:00
5 changed files with 4 additions and 15 deletions

View file

@ -73,16 +73,6 @@ ModelIndex Model::index(int row, int column, const ModelIndex&) const
return create_index(row, column);
}
ModelIndex Model::sibling(int row, int column, const ModelIndex& parent) const
{
if (!parent.is_valid())
return index(row, column, {});
int row_count = this->row_count(parent);
if (row < 0 || row > row_count)
return {};
return index(row, column, parent);
}
bool Model::accepts_drag(const ModelIndex&, const StringView&)
{
return false;