Skip to content

Commit

Permalink
Merge pull request #677 from imwints/cpu-model
Browse files Browse the repository at this point in the history
  • Loading branch information
aristocratos authored Dec 12, 2023
2 parents 14e664e + b6a8696 commit cfd20a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/linux/btop_collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ namespace Cpu {

}

auto name_vec = ssplit(name);
auto name_vec = ssplit(name, ' ');

if ((s_contains(name, "Xeon"s) or v_contains(name_vec, "Duo"s)) and v_contains(name_vec, "CPU"s)) {
auto cpu_pos = v_index(name_vec, "CPU"s);
Expand All @@ -355,7 +355,7 @@ namespace Cpu {
}
else if (s_contains(name, "Intel"s) and v_contains(name_vec, "CPU"s)) {
auto cpu_pos = v_index(name_vec, "CPU"s);
if (cpu_pos < name_vec.size() - 1 and not name_vec.at(cpu_pos + 1).ends_with(')') and name_vec.at(cpu_pos + 1) != "@")
if (cpu_pos < name_vec.size() - 1 and not name_vec.at(cpu_pos + 1).ends_with(')') and name_vec.at(cpu_pos + 1).size() != 1)
name = name_vec.at(cpu_pos + 1);
else
name.clear();
Expand Down

0 comments on commit cfd20a3

Please sign in to comment.