Fix type: ulong -> size_t and compare std::cmp_less

This commit is contained in:
aristocratos 2023-06-05 21:59:26 +02:00
parent 85a10f0305
commit 85892a9fe3
2 changed files with 2 additions and 2 deletions

View file

@ -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());

View file

@ -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)