summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawid Wolosowicz <d@1823.pl>2021-09-07 18:14:47 +0200
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-09-08 15:48:02 +0430
commitac798da6420827b6ce7bbcec82cdcd17b63fc3ed (patch)
tree0d7ed53be15ec1284b8a6a8b5fc75c17d9843ce1
parent484b9c1ba3654925d2db45a6afe5b2a8bf421926 (diff)
downloadserenity-ac798da6420827b6ce7bbcec82cdcd17b63fc3ed.zip
SystemMonitor: West Const to East Const refactor
-rw-r--r--Userland/Applications/SystemMonitor/ProcessModel.cpp8
-rw-r--r--Userland/Applications/SystemMonitor/ProcessModel.h12
2 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Applications/SystemMonitor/ProcessModel.cpp b/Userland/Applications/SystemMonitor/ProcessModel.cpp
index e5350b08ca..759361d431 100644
--- a/Userland/Applications/SystemMonitor/ProcessModel.cpp
+++ b/Userland/Applications/SystemMonitor/ProcessModel.cpp
@@ -45,12 +45,12 @@ ProcessModel::~ProcessModel()
{
}
-int ProcessModel::row_count(const GUI::ModelIndex&) const
+int ProcessModel::row_count(GUI::ModelIndex const&) const
{
return m_tids.size();
}
-int ProcessModel::column_count(const GUI::ModelIndex&) const
+int ProcessModel::column_count(GUI::ModelIndex const&) const
{
return Column::__Count;
}
@@ -128,7 +128,7 @@ static String pretty_byte_size(size_t size)
return String::formatted("{}K", size / 1024);
}
-GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
+GUI::Variant ProcessModel::data(GUI::ModelIndex const& index, GUI::ModelRole role) const
{
VERIFY(is_within_range(index));
@@ -313,7 +313,7 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
return {};
}
-Vector<GUI::ModelIndex> ProcessModel::matches(const StringView& searching, unsigned flags, const GUI::ModelIndex&)
+Vector<GUI::ModelIndex> ProcessModel::matches(StringView const& searching, unsigned flags, GUI::ModelIndex const&)
{
Vector<GUI::ModelIndex> found_indices;
diff --git a/Userland/Applications/SystemMonitor/ProcessModel.h b/Userland/Applications/SystemMonitor/ProcessModel.h
index a3a6cc704c..560ac55725 100644
--- a/Userland/Applications/SystemMonitor/ProcessModel.h
+++ b/Userland/Applications/SystemMonitor/ProcessModel.h
@@ -56,12 +56,12 @@ public:
static NonnullRefPtr<ProcessModel> create() { return adopt_ref(*new ProcessModel); }
virtual ~ProcessModel() override;
- virtual int row_count(const GUI::ModelIndex&) const override;
- virtual int column_count(const GUI::ModelIndex&) const override;
+ virtual int row_count(GUI::ModelIndex const&) const override;
+ virtual int column_count(GUI::ModelIndex const&) const override;
virtual String column_name(int column) const override;
- virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
+ virtual GUI::Variant data(GUI::ModelIndex const&, GUI::ModelRole) const override;
virtual bool is_searchable() const override { return true; }
- virtual Vector<GUI::ModelIndex> matches(const StringView&, unsigned = MatchesFlag::AllMatching, const GUI::ModelIndex& = GUI::ModelIndex()) override;
+ virtual Vector<GUI::ModelIndex> matches(StringView const&, unsigned = MatchesFlag::AllMatching, GUI::ModelIndex const& = GUI::ModelIndex()) override;
virtual bool is_column_sortable(int column_index) const override { return column_index != Column::Icon; }
void update();
@@ -76,10 +76,10 @@ public:
}
};
- Function<void(const NonnullOwnPtrVector<CpuInfo>&)> on_cpu_info_change;
+ Function<void(NonnullOwnPtrVector<CpuInfo> const&)> on_cpu_info_change;
Function<void(int process_count, int thread_count)> on_state_update;
- const NonnullOwnPtrVector<CpuInfo>& cpus() const { return m_cpus; }
+ NonnullOwnPtrVector<CpuInfo> const& cpus() const { return m_cpus; }
private:
ProcessModel();