From 0ba8da916429ca768989cb1046df9b28ff52ec37 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 25 Dec 2016 19:08:49 +0100 Subject: use uniform initializer syntax to simplify code Change-Id: I617c63c16cc2ba06f88d7101716ab05daf4b30a4 Reviewed-on: https://gerrit.libreoffice.org/32423 Tested-by: Jenkins Reviewed-by: Markus Mohrhard --- oox/source/token/namespacemap.cxx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'oox') diff --git a/oox/source/token/namespacemap.cxx b/oox/source/token/namespacemap.cxx index f320b993e310..7fd99a5dfb43 100644 --- a/oox/source/token/namespacemap.cxx +++ b/oox/source/token/namespacemap.cxx @@ -23,25 +23,13 @@ namespace oox { NamespaceMap::NamespaceMap() { - static const struct NamespaceUrl { sal_Int32 mnId; const sal_Char* mpcUrl; } spNamespaceUrls[] = - { -// include auto-generated C array with namespace URLs as C strings + maTransitionalNamespaceMap = std::map{ #include "namespacenames.inc" - { -1, "" } }; - static const struct NamespaceStrictUrl { sal_Int32 mnId; const sal_Char* mpcUrl; } spNamespaceStrictUrls[] = - { -// include auto-generated C array with namespace URLs as C strings + maStrictNamespaceMap = std::map{ #include "namespaces-strictnames.inc" - { -1, "" } }; - - for( const NamespaceUrl* pNamespaceUrl = spNamespaceUrls; pNamespaceUrl->mnId != -1; ++pNamespaceUrl ) - maTransitionalNamespaceMap[ pNamespaceUrl->mnId ] = OUString::createFromAscii( pNamespaceUrl->mpcUrl ); - - for( const NamespaceStrictUrl* pNamespaceUrl = spNamespaceStrictUrls; pNamespaceUrl->mnId != -1; ++pNamespaceUrl ) - maStrictNamespaceMap[ pNamespaceUrl->mnId ] = OUString::createFromAscii( pNamespaceUrl->mpcUrl ); } } -- cgit