Skip to content

Commit

Permalink
Fix type: ulong -> size_t and compare std::cmp_less
Browse files Browse the repository at this point in the history
  • Loading branch information
aristocratos committed Jun 5, 2023
1 parent 85a10f0 commit 85892a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/btop_draw.cpp
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/linux/btop_collect.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 85892a9

Please sign in to comment.