1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-14 02:12:08 +00:00

LibGUI: Fix compiler warnings.

This commit is contained in:
Andreas Kling 2019-06-22 14:41:11 +02:00
parent 56ae96558b
commit 3f0f7caa45
6 changed files with 21 additions and 13 deletions

View file

@ -23,10 +23,10 @@ struct GFileSystemModel::Node {
GModelIndex index(const GFileSystemModel& model) const
{
if (!parent)
return model.create_index(0, 0, (void*)this);
return model.create_index(0, 0, const_cast<Node*>(this));
for (int row = 0; row < parent->children.size(); ++row) {
if (parent->children[row] == this)
return model.create_index(row, 0, (void*)this);
return model.create_index(row, 0, const_cast<Node*>(this));
}
ASSERT_NOT_REACHED();
}