mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
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:
parent
fe19cf0ff2
commit
4088beb8eb
Notes:
sideshowbarker
2024-07-19 03:40:21 +09:00
Author: https://github.com/awesomekling
Commit: 4088beb8eb
5 changed files with 4 additions and 15 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue