diff options
author | Arnaud VERSINI <arnaud.versini@libreoffice.org> | 2023-03-19 17:06:40 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-20 05:45:07 +0000 |
commit | d4822aa45017349fcff36e9a61e1e5b0237b208f (patch) | |
tree | 4b6c492c222e0522cf5855a1de49ab22e2203e81 /cppuhelper | |
parent | 3d4ac66e25427a71798ab720df8078a541d745da (diff) |
cppuhelper : use constexpr OUStringLiteral instead of a function
Change-Id: Icc25698e4213edbeaae1a997dccbee0ff529ce3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149092
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/access_control.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cppuhelper/source/access_control.cxx b/cppuhelper/source/access_control.cxx index 0e18ef78684a..da8343648a95 100644 --- a/cppuhelper/source/access_control.cxx +++ b/cppuhelper/source/access_control.cxx @@ -30,20 +30,14 @@ using namespace ::osl; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -namespace -{ - OUString str_ac_singleton() - { - return "/singletons/com.sun.star.security.theAccessController"; - } -} +constexpr OUStringLiteral ACCESS_CONTROLLER_SINGLETON = u"/singletons/com.sun.star.security.theAccessController"; namespace cppu { AccessControl::AccessControl( Reference< XComponentContext > const & xContext ) { - if (! (xContext->getValueByName( str_ac_singleton() ) >>= m_xController)) + if (! (xContext->getValueByName( ACCESS_CONTROLLER_SINGLETON ) >>= m_xController)) { throw SecurityException( "no access controller!" ); } |