diff options
author | Sadie Powell <sadie@witchery.services> | 2021-01-19 08:11:01 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-01-19 08:11:01 +0000 |
commit | ebe3e3f3cfef79e5b92b4c1d8fc9913dac4ddf43 (patch) | |
tree | 418db275b4c265dcdf98b7bad1c1bfa1de51dbc6 /include/modules/cap.h | |
parent | 28fef58b882e34369c935d56cb4ac50429cba8c7 (diff) |
Allow converting a Cap::Reference to a Cap::Capability*.
Diffstat (limited to 'include/modules/cap.h')
-rw-r--r-- | include/modules/cap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/modules/cap.h b/include/modules/cap.h index 9dacdc200..664120d39 100644 --- a/include/modules/cap.h +++ b/include/modules/cap.h @@ -304,6 +304,12 @@ namespace Cap { } + /** Retrieves the underlying cap. */ + operator const Cap::Capability*() const + { + return ref ? *ref : NULL; + } + /** Check whether a user has the referenced capability turned on. * @param user User to check * @return True if the user is using the referenced capability, false otherwise |