mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:47:46 +00:00
LibWeb: Make TreeNode::child_count return size_t instead of int
The primary benefit of this is that it's unsigned, as you can't have a negative amount of children. Plus, all the users of child_count expect it to be size_t.
This commit is contained in:
parent
3d44118595
commit
af3c866898
1 changed files with 2 additions and 2 deletions
|
@ -56,9 +56,9 @@ public:
|
||||||
const T* first_child() const { return m_first_child; }
|
const T* first_child() const { return m_first_child; }
|
||||||
const T* last_child() const { return m_last_child; }
|
const T* last_child() const { return m_last_child; }
|
||||||
|
|
||||||
int child_count() const
|
size_t child_count() const
|
||||||
{
|
{
|
||||||
int count = 0;
|
size_t count = 0;
|
||||||
for (auto* child = first_child(); child; child = child->next_sibling())
|
for (auto* child = first_child(); child; child = child->next_sibling())
|
||||||
++count;
|
++count;
|
||||||
return count;
|
return count;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue