mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
GModel: Have create_index() take a const void*
This is just for convenience really. It lets you skip const_casting in all the code that calls this API, which you would basically always be doing otherwise.
This commit is contained in:
@@ -46,9 +46,9 @@ void GModel::set_selected_index(const GModelIndex& index)
|
||||
});
|
||||
}
|
||||
|
||||
GModelIndex GModel::create_index(int row, int column, void* data) const
|
||||
GModelIndex GModel::create_index(int row, int column, const void* data) const
|
||||
{
|
||||
return GModelIndex(*this, row, column, data);
|
||||
return GModelIndex(*this, row, column, const_cast<void*>(data));
|
||||
}
|
||||
|
||||
GModelIndex GModel::sibling(int row, int column, const GModelIndex& parent) const
|
||||
|
||||
Reference in New Issue
Block a user