diff --git a/src/btop_draw.cpp b/src/btop_draw.cpp index da06b438..9ebd40c3 100644 --- a/src/btop_draw.cpp +++ b/src/btop_draw.cpp @@ -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()); diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 2e85aad8..d9ef56bd 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -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)