mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:35: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:
parent
203612439a
commit
f6cb2fd2fb
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue