inspector: needs to call new PageList.maxSize func

This commit is contained in:
Mitchell Hashimoto
2024-03-17 22:04:03 -07:00
parent e7a2a9bcd1
commit 07a27072dc
2 changed files with 4 additions and 2 deletions

View File

@ -528,7 +528,7 @@ fn renderScreenWindow(self: *Inspector) void {
}
{
_ = cimgui.c.igTableSetColumnIndex(1);
cimgui.c.igText("%d bytes", pages.max_size);
cimgui.c.igText("%d bytes", pages.maxSize());
}
}

View File

@ -1600,7 +1600,9 @@ pub fn scrollClear(self: *PageList) !void {
for (0..non_empty) |_| _ = try self.grow();
}
fn maxSize(self: *const PageList) usize {
/// Returns the actual max size. This may be greater than the explicit
/// value if the explicit value is less than the min_max_size.
pub fn maxSize(self: *const PageList) usize {
return @max(self.explicit_max_size, self.min_max_size);
}