From 8dbe8eac89c563cbbc2de5c8e281f4fd9b817328 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 14 Jan 2020 16:25:06 +0200 Subject: clang-tidy modernize-concat-nested-namespace in codemaker..configmgr Change-Id: I48452480fae169e11d60b125bbd0226b6a35a25c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86800 Tested-by: Jenkins Reviewed-by: Noel Grandin --- comphelper/source/misc/automationinvokedzone.cxx | 5 +---- comphelper/source/misc/comphelper_module.cxx | 4 ++-- comphelper/source/misc/comphelper_services.cxx | 4 ++-- comphelper/source/misc/lok.cxx | 7 +------ comphelper/source/misc/random.cxx | 5 +---- comphelper/source/misc/servicedecl.cxx | 4 +--- comphelper/source/misc/string.cxx | 4 ++-- comphelper/source/misc/xmlsechelper.cxx | 5 +---- comphelper/source/streaming/memorystream.cxx | 2 +- comphelper/source/xml/xmltools.cxx | 5 +---- 10 files changed, 13 insertions(+), 32 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/automationinvokedzone.cxx b/comphelper/source/misc/automationinvokedzone.cxx index 2134217a1eaa..4a71c4a51817 100644 --- a/comphelper/source/misc/automationinvokedzone.cxx +++ b/comphelper/source/misc/automationinvokedzone.cxx @@ -11,9 +11,7 @@ #include -namespace comphelper -{ -namespace Automation +namespace comphelper::Automation { thread_local static int nActiveount = 0; @@ -31,6 +29,5 @@ AutomationInvokedZone::~AutomationInvokedZone() nActiveount--; } } -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/comphelper_module.cxx b/comphelper/source/misc/comphelper_module.cxx index 6f0d36b23888..9cf32546e1be 100644 --- a/comphelper/source/misc/comphelper_module.cxx +++ b/comphelper/source/misc/comphelper_module.cxx @@ -21,7 +21,7 @@ #include -namespace comphelper { namespace module +namespace comphelper::module { @@ -45,7 +45,7 @@ namespace comphelper { namespace module } -} } // namespace comphelper::module +} // namespace comphelper::module /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx index 5ab04afeadff..4fe3269efcfc 100644 --- a/comphelper/source/misc/comphelper_services.cxx +++ b/comphelper/source/misc/comphelper_services.cxx @@ -23,7 +23,7 @@ #include -namespace comphelper { namespace module +namespace comphelper::module { @@ -48,7 +48,7 @@ namespace comphelper { namespace module } -} } // namespace comphelper::module +} // namespace comphelper::module extern "C" SAL_DLLPUBLIC_EXPORT void* comphelp_component_getFactory( diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 2cab40dfa8f9..8a75db02f04b 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -14,10 +14,7 @@ #include #include -namespace comphelper -{ - -namespace LibreOfficeKit +namespace comphelper::LibreOfficeKit { static bool g_bActive(false); @@ -249,8 +246,6 @@ void statusIndicatorFinish() pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Finish, 0); } -} // namespace LibreOfficeKit - } // namespace comphelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/random.cxx b/comphelper/source/misc/random.cxx index f001b06195d6..260db3a544ca 100644 --- a/comphelper/source/misc/random.cxx +++ b/comphelper/source/misc/random.cxx @@ -25,9 +25,7 @@ // this is nothing but a simple wrapper around // the std::random generators -namespace comphelper -{ -namespace rng +namespace comphelper::rng { // underlying random number generator @@ -118,7 +116,6 @@ double uniform_real_distribution(double a, double b) return dist(gen.global_rng); } -} // namespace } // namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx index 410ef472ee26..ebbca601ecbe 100644 --- a/comphelper/source/misc/servicedecl.cxx +++ b/comphelper/source/misc/servicedecl.cxx @@ -28,8 +28,7 @@ using namespace com::sun::star; -namespace comphelper { -namespace service_decl { +namespace comphelper::service_decl { const char cDelim = ';'; @@ -156,7 +155,6 @@ void* component_getFactoryHelper( const char* pImplName, return nullptr; } -} // namespace service_decl } // namespace comphelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 296c9ac016d3..ba84ff032b66 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -40,7 +40,7 @@ #include -namespace comphelper { namespace string { +namespace comphelper::string { namespace { @@ -492,6 +492,6 @@ OUString setToken(const OUString& rIn, sal_Int32 nToken, sal_Unicode cTok, return rIn; } -} } +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/xmlsechelper.cxx b/comphelper/source/misc/xmlsechelper.cxx index d0b4b3074ca9..c8257c124755 100644 --- a/comphelper/source/misc/xmlsechelper.cxx +++ b/comphelper/source/misc/xmlsechelper.cxx @@ -26,9 +26,7 @@ using namespace std; -namespace comphelper -{ -namespace xmlsec +namespace comphelper::xmlsec { OUString GetCertificateKind( const css::security::CertificateKind &rKind ) { @@ -326,6 +324,5 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) return aStr.makeStringAndClear(); } } -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 940c9012f149..4e5beee9d032 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -33,7 +33,7 @@ #include #include -namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } } +namespace com::sun::star::uno { class XComponentContext; } using ::cppu::OWeakObject; using ::cppu::WeakImplHelper; diff --git a/comphelper/source/xml/xmltools.cxx b/comphelper/source/xml/xmltools.cxx index 14809221d0e5..04e97406b293 100644 --- a/comphelper/source/xml/xmltools.cxx +++ b/comphelper/source/xml/xmltools.cxx @@ -69,9 +69,7 @@ namespace } } -namespace comphelper -{ - namespace xml +namespace comphelper::xml { OString makeXMLChaff() { @@ -105,5 +103,4 @@ namespace comphelper return str; } } -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit