Skip to content

Commit

Permalink
Kernel: Rename ProcessorInfo::{m_brandstr => m_brand}
Browse files Browse the repository at this point in the history
There's no need to specify the type of the member in it's name,
especially not in shorthand format.
  • Loading branch information
IdanHo committed Jan 12, 2022
1 parent be81278 commit f9528f1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Kernel/Arch/x86/ProcessorInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Processor;
class ProcessorInfo {
Processor& m_processor;
String m_cpuid;
String m_brandstr;
String m_brand;
NonnullOwnPtr<KString> m_features;
u32 m_display_model;
u32 m_display_family;
Expand All @@ -32,7 +32,7 @@ class ProcessorInfo {
ProcessorInfo(Processor& processor);

const String& cpuid() const { return m_cpuid; }
const String& brandstr() const { return m_brandstr; }
const String& brand() const { return m_brand; }
StringView features() const { return m_features->view(); }
u32 display_model() const { return m_display_model; }
u32 display_family() const { return m_display_family; }
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Arch/x86/common/ProcessorInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ProcessorInfo::ProcessorInfo(Processor& processor)
copy_brand_string_part_to_buffer(0);
copy_brand_string_part_to_buffer(1);
copy_brand_string_part_to_buffer(2);
m_brandstr = buffer;
m_brand = buffer;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Kernel/GlobalProcessExposed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ class ProcFSCPUInformation final : public ProcFSGlobalInformation {
obj.add("model", info.display_model());
obj.add("stepping", info.stepping());
obj.add("type", info.type());
obj.add("brandstr", info.brandstr());
obj.add("brand", info.brand());
});
array.finish();
return {};
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/SystemMonitor/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ NonnullRefPtr<GUI::Widget> build_hardware_tab()
Vector<GUI::JsonArrayModel::FieldSpec> processors_field;
processors_field.empend("processor", "Processor", Gfx::TextAlignment::CenterRight);
processors_field.empend("cpuid", "CPUID", Gfx::TextAlignment::CenterLeft);
processors_field.empend("brandstr", "Brand", Gfx::TextAlignment::CenterLeft);
processors_field.empend("brand", "Brand", Gfx::TextAlignment::CenterLeft);
processors_field.empend("Features", Gfx::TextAlignment::CenterLeft, [](auto& object) {
StringBuilder builder;
auto features = object.get("features").as_array();
Expand Down

0 comments on commit f9528f1

Please sign in to comment.