mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-20 01:11:07 +00:00
LibGUI+Applications: Rename Model::is_valid to is_within_range
The previous name did not describe what the function checked, and was easy to confuse with ModelIndex::is_valid.
This commit is contained in:
parent
9899addb1d
commit
16ac3bbfd7
Notes:
sideshowbarker
2024-07-18 07:24:21 +09:00
Author: https://github.com/sin-ack
Commit: 16ac3bbfd7
Pull-request: https://github.com/SerenityOS/serenity/pull/9243
8 changed files with 18 additions and 18 deletions
|
@ -69,7 +69,7 @@ public:
|
|||
virtual bool is_column_sortable([[maybe_unused]] int column_index) const { return true; }
|
||||
virtual void sort([[maybe_unused]] int column, SortOrder) { }
|
||||
|
||||
bool is_valid(const ModelIndex& index) const
|
||||
bool is_within_range(ModelIndex const& index) const
|
||||
{
|
||||
auto parent_index = this->parent_index(index);
|
||||
return index.row() >= 0 && index.row() < row_count(parent_index) && index.column() >= 0 && index.column() < column_count(parent_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue