svgio/source/svgreader/svgtoken.cxx |    8 ++++----
 svgio/source/svgreader/svgtools.cxx |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit cf07373d84b0ad6d0110b62966705b3e101785b5
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Jul 11 10:52:40 2023 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Jul 11 16:44:07 2023 +0200

    svgio: use frozen::make_unordered_map so no need to specify the count
    
    Change-Id: Id8400cba4c00439b4f4b888782d68531f7a64617
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154293
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/svgio/source/svgreader/svgtoken.cxx 
b/svgio/source/svgreader/svgtoken.cxx
index 0d77ca901ee8..d5222a2df125 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -25,7 +25,7 @@
 namespace svgio::svgreader
 {
 
-constexpr frozen::unordered_map<std::u16string_view, SVGToken, 145> 
aSVGTokenMapperList
+constexpr auto aSVGTokenMapperList = 
frozen::make_unordered_map<std::u16string_view, SVGToken>(
 {
     { u"width", SVGToken::Width },
     { u"height", SVGToken::Height },
@@ -178,11 +178,11 @@ constexpr frozen::unordered_map<std::u16string_view, 
SVGToken, 145> aSVGTokenMap
     { u"text", SVGToken::Text },
     { u"baseline-shift", SVGToken::BaselineShift },
     { u"flowRoot", SVGToken::FlowRoot }
-};
+});
 
 // The same elements as the map above but lowercase. CSS is case insensitive
 // TODO: create separate maps for css and xml elements
-constexpr frozen::unordered_map<std::u16string_view, SVGToken, 145> 
aSVGLowerCaseTokenMapperList
+constexpr auto  aSVGLowerCaseTokenMapperList = 
frozen::make_unordered_map<std::u16string_view, SVGToken>(
 {
     { u"width", SVGToken::Width },
     { u"height", SVGToken::Height },
@@ -335,7 +335,7 @@ constexpr frozen::unordered_map<std::u16string_view, 
SVGToken, 145> aSVGLowerCas
     { u"text", SVGToken::Text },
     { u"baseline-shift", SVGToken::BaselineShift },
     { u"flowroot", SVGToken::FlowRoot }
-};
+});
 
 static_assert(sizeof(aSVGTokenMapperList) == 
sizeof(aSVGLowerCaseTokenMapperList),
         "Number of elements in both maps must be the same");
diff --git a/svgio/source/svgreader/svgtools.cxx 
b/svgio/source/svgreader/svgtools.cxx
index ce8b4f99bd62..e76d8ae4b448 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -32,7 +32,7 @@
 
 namespace svgio::svgreader
 {
-        constexpr frozen::unordered_map<std::u16string_view, Color, 147> 
aColorTokenMapperList
+        constexpr auto aColorTokenMapperList = 
frozen::make_unordered_map<std::u16string_view, Color>(
         {
             { u"aliceblue", Color(240, 248, 255) },
             { u"antiquewhite", Color(250, 235, 215) },
@@ -181,7 +181,7 @@ namespace svgio::svgreader
             { u"whitesmoke", Color(245, 245, 245) },
             { u"yellow", Color(255, 255, 0) },
             { u"yellowgreen", Color(154, 205, 50) }
-        };
+        });
 
         basegfx::B2DHomMatrix SvgAspectRatio::createLinearMapping(const 
basegfx::B2DRange& rTarget, const basegfx::B2DRange& rSource)
         {

Reply via email to