1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:17:44 +00:00

AK: Make Bitmap use size_t for its size

Also rework its API's to return Optional<size_t> instead of int with -1
as the error value.
This commit is contained in:
Andreas Kling 2020-02-24 09:55:46 +01:00
parent b813b2f871
commit 0763f67043
4 changed files with 34 additions and 32 deletions

View file

@ -78,7 +78,7 @@ size_t InodeVMObject::amount_clean() const
size_t InodeVMObject::amount_dirty() const
{
size_t count = 0;
for (int i = 0; i < m_dirty_pages.size(); ++i) {
for (size_t i = 0; i < m_dirty_pages.size(); ++i) {
if (m_dirty_pages.get(i))
++count;
}

View file

@ -164,7 +164,7 @@ u32 Region::cow_pages() const
if (!m_cow_map)
return 0;
u32 count = 0;
for (int i = 0; i < m_cow_map->size(); ++i)
for (size_t i = 0; i < m_cow_map->size(); ++i)
count += m_cow_map->get(i);
return count;
}