1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:07:34 +00:00

Kernel: Switch Custody to east-const style

This commit is contained in:
Andreas Kling 2021-07-11 00:51:38 +02:00
parent 4238e2e9be
commit 7a4e6257b7
2 changed files with 3 additions and 3 deletions

View file

@ -69,7 +69,7 @@ String Custody::absolute_path() const
{ {
if (!parent()) if (!parent())
return "/"; return "/";
Vector<const Custody*, 32> custody_chain; Vector<Custody const*, 32> custody_chain;
for (auto* custody = this; custody; custody = custody->parent()) for (auto* custody = this; custody; custody = custody->parent())
custody_chain.append(custody); custody_chain.append(custody);
StringBuilder builder; StringBuilder builder;

View file

@ -26,9 +26,9 @@ public:
~Custody(); ~Custody();
Custody* parent() { return m_parent.ptr(); } Custody* parent() { return m_parent.ptr(); }
const Custody* parent() const { return m_parent.ptr(); } Custody const* parent() const { return m_parent.ptr(); }
Inode& inode() { return *m_inode; } Inode& inode() { return *m_inode; }
const Inode& inode() const { return *m_inode; } Inode const& inode() const { return *m_inode; }
StringView name() const { return m_name->view(); } StringView name() const { return m_name->view(); }
OwnPtr<KString> try_create_absolute_path() const; OwnPtr<KString> try_create_absolute_path() const;
String absolute_path() const; String absolute_path() const;