kernel/timer: Make data members private where applicable

Instead, we can just expose functions that return the queryable state
instead of letting anything modify it.
This commit is contained in:
Lioncash 2018-07-26 09:45:18 -04:00 committed by zhupengfei
parent 4a3c4f5f67
commit 8e103d0675
No known key found for this signature in database
GPG key ID: 85B82A3E62174206
3 changed files with 23 additions and 10 deletions

View file

@ -298,11 +298,11 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeTimer::GetChildren() const {
const auto& timer = static_cast<const Kernel::Timer&>(object);
list.push_back(std::make_unique<WaitTreeText>(
tr("reset type = %1").arg(GetResetTypeQString(timer.reset_type))));
tr("reset type = %1").arg(GetResetTypeQString(timer.GetResetType()))));
list.push_back(
std::make_unique<WaitTreeText>(tr("initial delay = %1").arg(timer.initial_delay)));
std::make_unique<WaitTreeText>(tr("initial delay = %1").arg(timer.GetInitialDelay())));
list.push_back(
std::make_unique<WaitTreeText>(tr("interval delay = %1").arg(timer.interval_delay)));
std::make_unique<WaitTreeText>(tr("interval delay = %1").arg(timer.GetIntervalDelay())));
return list;
}