From bb1e5a7b60ea200ddae99f263a38a219879f9617 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 8 Mar 2026 17:01:22 +0000 Subject: Replace IS_* with member functions. - All user types get an Is* function. - Only local users are cast using the old function so only local users get an As* function. --- modules/cap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/cap.cpp') diff --git a/modules/cap.cpp b/modules/cap.cpp index f171d89a4..e4aa90609 100644 --- a/modules/cap.cpp +++ b/modules/cap.cpp @@ -284,8 +284,8 @@ namespace { std::string SerializeCaps(const Extensible* container, bool human) { - // XXX: Cast away the const because IS_LOCAL() doesn't handle it - LocalUser* user = IS_LOCAL(const_cast(static_cast(container))); + // XXX: Cast away the const because HandleList doesn't handle it + auto* user = const_cast(static_cast(container))->AsLocal(); if (!user) return {}; @@ -333,7 +333,7 @@ void Cap::ExtItem::FromInternal(Extensible* container, const std::string& value) if (container->extype != this->extype) return; - LocalUser* user = IS_LOCAL(static_cast(container)); + auto* user = static_cast(container)->AsLocal(); if (!user) return; // Can't happen -- cgit v1.3.1-10-gc9f91