1
Fork 0
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:
Andreas Kling 2019-08-18 10:14:53 +02:00
parent 203612439a
commit f6cb2fd2fb
2 changed files with 3 additions and 3 deletions

View file

@ -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