diff options
author | masiboss <32394683+masiboss@users.noreply.github.com> | 2023-12-07 21:42:11 +0100 |
---|---|---|
committer | masiboss <32394683+masiboss@users.noreply.github.com> | 2023-12-07 21:42:11 +0100 |
commit | 5902484f39fea0751093368e3181ac8cbe37e9a6 (patch) | |
tree | 9a4628c77f40508734401f101b3ec14c1ea59f9e | |
parent | 5beb9e12e5645e64644eb8465b097468172e244f (diff) |
simplify removal of "Apple"
-rw-r--r-- | src/osx/btop_collect.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/osx/btop_collect.cpp b/src/osx/btop_collect.cpp index 9ad107c..e410c74 100644 --- a/src/osx/btop_collect.cpp +++ b/src/osx/btop_collect.cpp @@ -227,11 +227,6 @@ namespace Cpu { name = name_vec.at(cpu_pos + 1); else name.clear(); - } else if (v_contains(name_vec, "Apple"s)) { - auto apple_pos = v_index(name_vec, "Apple"s); - name = (apple_pos < name_vec.size() - 1 ? name_vec.at(apple_pos + 1) : "") - + (apple_pos < name_vec.size() - 1 && name_vec.size() > 2 ? ' ' + name_vec.at(apple_pos + 2) : "") - + (apple_pos < name_vec.size() - 1 && name_vec.size() > 3 ? ' ' + name_vec.at(apple_pos + 3) : ""); } else name.clear(); @@ -241,7 +236,7 @@ namespace Cpu { name += n + ' '; } name.pop_back(); - for (const auto& replace : {"Processor", "CPU", "(R)", "(TM)", "Intel", "AMD", "Core"}) { + for (const auto& replace : {"Processor", "CPU", "(R)", "(TM)", "Intel", "AMD", "Apple", "Core"}) { name = s_replace(name, replace, ""); name = s_replace(name, " ", " "); } |