mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-16 10:22:46 +12:00
Fix type: ulong -> size_t and compare std::cmp_less
This commit is contained in:
parent
85a10f0305
commit
85892a9fe3
|
@ -612,7 +612,7 @@ namespace Cpu {
|
|||
graphs.resize(1);
|
||||
graph_width = graph_default_width;
|
||||
graphs[0] = Draw::Graph{ graph_width, graph_height, "cpu", cpu.cpu_percent.at(graph_field), graph_symbol, invert, true };
|
||||
if ((ulong)Gpu::shown < gpus.size()) {
|
||||
if (std::cmp_less(Gpu::shown, gpus.size())) {
|
||||
gpu_temp_graphs.resize(gpus.size());
|
||||
gpu_mem_graphs.resize(gpus.size());
|
||||
gpu_meters.resize(gpus.size());
|
||||
|
|
|
@ -253,7 +253,7 @@ namespace Shared {
|
|||
|
||||
using namespace Gpu;
|
||||
gpu_b_height_offsets.resize(gpus.size());
|
||||
for (ulong i = 0; i < gpu_b_height_offsets.size(); ++i)
|
||||
for (size_t i = 0; i < gpu_b_height_offsets.size(); ++i)
|
||||
gpu_b_height_offsets[i] = gpus[i].supported_functions.gpu_utilization
|
||||
+ gpus[i].supported_functions.pwr_usage
|
||||
+ (gpus[i].supported_functions.mem_total or gpus[i].supported_functions.mem_used)
|
||||
|
|
Loading…
Reference in a new issue