cppuhelper/source/access_control.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
New commits: commit d4822aa45017349fcff36e9a61e1e5b0237b208f Author: Arnaud VERSINI <arnaud.vers...@libreoffice.org> AuthorDate: Sun Mar 19 17:06:40 2023 +0100 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Mar 20 05:45:07 2023 +0000 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.gran...@collabora.co.uk> Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> 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!" ); }