mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-15 07:32:52 +00:00
SystemMonitor: Remove uneeded cast from unsigned to int
GVariant now supports unsigned ints :^)
This commit is contained in:
parent
c1e8590a40
commit
bbe99ae960
Notes:
sideshowbarker
2024-07-19 10:43:17 +09:00
Author: https://github.com/shannonbooth
Commit: bbe99ae960
Pull-request: https://github.com/SerenityOS/serenity/pull/907
1 changed files with 20 additions and 22 deletions
|
@ -191,27 +191,26 @@ GVariant ProcessModel::data(const GModelIndex& index, Role role) const
|
|||
return thread.current_state.cpu_percent;
|
||||
case Column::Name:
|
||||
return thread.current_state.name;
|
||||
// FIXME: GVariant with unsigned?
|
||||
case Column::Syscalls:
|
||||
return (int)thread.current_state.syscall_count;
|
||||
return thread.current_state.syscall_count;
|
||||
case Column::InodeFaults:
|
||||
return (int)thread.current_state.inode_faults;
|
||||
return thread.current_state.inode_faults;
|
||||
case Column::ZeroFaults:
|
||||
return (int)thread.current_state.zero_faults;
|
||||
return thread.current_state.zero_faults;
|
||||
case Column::CowFaults:
|
||||
return (int)thread.current_state.cow_faults;
|
||||
return thread.current_state.cow_faults;
|
||||
case Column::IPv4SocketReadBytes:
|
||||
return (int)thread.current_state.ipv4_socket_read_bytes;
|
||||
return thread.current_state.ipv4_socket_read_bytes;
|
||||
case Column::IPv4SocketWriteBytes:
|
||||
return (int)thread.current_state.ipv4_socket_write_bytes;
|
||||
return thread.current_state.ipv4_socket_write_bytes;
|
||||
case Column::UnixSocketReadBytes:
|
||||
return (int)thread.current_state.unix_socket_read_bytes;
|
||||
return thread.current_state.unix_socket_read_bytes;
|
||||
case Column::UnixSocketWriteBytes:
|
||||
return (int)thread.current_state.unix_socket_write_bytes;
|
||||
return thread.current_state.unix_socket_write_bytes;
|
||||
case Column::FileReadBytes:
|
||||
return (int)thread.current_state.file_read_bytes;
|
||||
return thread.current_state.file_read_bytes;
|
||||
case Column::FileWriteBytes:
|
||||
return (int)thread.current_state.file_write_bytes;
|
||||
return thread.current_state.file_write_bytes;
|
||||
}
|
||||
ASSERT_NOT_REACHED();
|
||||
return {};
|
||||
|
@ -259,27 +258,26 @@ GVariant ProcessModel::data(const GModelIndex& index, Role role) const
|
|||
return thread.current_state.cpu_percent;
|
||||
case Column::Name:
|
||||
return thread.current_state.name;
|
||||
// FIXME: It's weird that GVariant doesn't support unsigned ints. Should it?
|
||||
case Column::Syscalls:
|
||||
return (int)thread.current_state.syscall_count;
|
||||
return thread.current_state.syscall_count;
|
||||
case Column::InodeFaults:
|
||||
return (int)thread.current_state.inode_faults;
|
||||
return thread.current_state.inode_faults;
|
||||
case Column::ZeroFaults:
|
||||
return (int)thread.current_state.zero_faults;
|
||||
return thread.current_state.zero_faults;
|
||||
case Column::CowFaults:
|
||||
return (int)thread.current_state.cow_faults;
|
||||
return thread.current_state.cow_faults;
|
||||
case Column::IPv4SocketReadBytes:
|
||||
return (int)thread.current_state.ipv4_socket_read_bytes;
|
||||
return thread.current_state.ipv4_socket_read_bytes;
|
||||
case Column::IPv4SocketWriteBytes:
|
||||
return (int)thread.current_state.ipv4_socket_write_bytes;
|
||||
return thread.current_state.ipv4_socket_write_bytes;
|
||||
case Column::UnixSocketReadBytes:
|
||||
return (int)thread.current_state.unix_socket_read_bytes;
|
||||
return thread.current_state.unix_socket_read_bytes;
|
||||
case Column::UnixSocketWriteBytes:
|
||||
return (int)thread.current_state.unix_socket_write_bytes;
|
||||
return thread.current_state.unix_socket_write_bytes;
|
||||
case Column::FileReadBytes:
|
||||
return (int)thread.current_state.file_read_bytes;
|
||||
return thread.current_state.file_read_bytes;
|
||||
case Column::FileWriteBytes:
|
||||
return (int)thread.current_state.file_write_bytes;
|
||||
return thread.current_state.file_write_bytes;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue