vcl/inc/implimagetree.hxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 8969695b2b764a7bebf183d80b1161a142536566
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed May 11 13:59:21 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu May 12 08:26:43 2022 +0200

    pre-size the maLinkHash map to avoid allocations
    
    Change-Id: I926747d852dc2de56b7125132e74a1c23c75bbd4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134204
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/inc/implimagetree.hxx b/vcl/inc/implimagetree.hxx
index 48773cc42c23..e3389f74bf86 100644
--- a/vcl/inc/implimagetree.hxx
+++ b/vcl/inc/implimagetree.hxx
@@ -103,11 +103,15 @@ private:
         IconLinkHash maLinkHash;
 
         IconSet()
-        {}
+        {
+            maLinkHash.reserve(50);
+        }
 
         IconSet(const OUString & rURL)
             : maURL(rURL)
-        {}
+        {
+            maLinkHash.reserve(50);
+        }
     };
 
     /// Remember all the (used) icon styles and individual icons in them.

Reply via email to