mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:17:36 +00:00
Kernel: Resolve clang-tidy readability-make-member-function-const
... In files included from Kernel/Thread.cpp or Kernel/Process.cpp Some places the warning is suppressed, because we do not want a const object do have non-const access to the returned sub-object.
This commit is contained in:
parent
a92132e44a
commit
65edc62c02
11 changed files with 18 additions and 14 deletions
|
@ -37,6 +37,7 @@ public:
|
|||
bool operator==(const VirtualAddress& other) const { return m_address == other.m_address; }
|
||||
bool operator!=(const VirtualAddress& other) const { return m_address != other.m_address; }
|
||||
|
||||
// NOLINTNEXTLINE(readability-make-member-function-const) const VirtualAddress shouldn't be allowed to modify the underlying memory
|
||||
[[nodiscard]] u8* as_ptr() { return reinterpret_cast<u8*>(m_address); }
|
||||
[[nodiscard]] const u8* as_ptr() const { return reinterpret_cast<const u8*>(m_address); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue