bin/find-can-be-private-symbols.functions.results |    2 +-
 vcl/inc/unx/fontmanager.hxx                       |    2 +-
 vcl/unx/generic/fontmanager/fontconfig.cxx        |    4 +---
 vcl/unx/generic/fontmanager/fontmanager.cxx       |    6 +-----
 4 files changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 4618de024845573e33324539a7b455cd274a5fc3
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Mon Mar 7 11:33:49 2022 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Mon Mar 7 11:47:32 2022 +0100

    Drop useless parameter
    
    The parameter to PrintFontManager::countFontconfigFonts() was only
    written to since babf6d5e53516e80e8e3f2485796ebfaeb20e9c1.
    
    Change-Id: Ie206fdbd620f1cfc6402c1d02709c3b653140c85
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131097
    Tested-by: Jenkins
    Reviewed-by: Tor Lillqvist <t...@collabora.com>

diff --git a/bin/find-can-be-private-symbols.functions.results 
b/bin/find-can-be-private-symbols.functions.results
index 2039061f1477..137b54d7a903 100644
--- a/bin/find-can-be-private-symbols.functions.results
+++ b/bin/find-can-be-private-symbols.functions.results
@@ -21124,7 +21124,7 @@ psp::PrintFontManager::analyzeFontFile(int, 
rtl::OString const&, char const*) co
 psp::PrintFontManager::analyzeSfntFamilyName(void const*, 
std::vector<rtl::OUString, std::allocator<rtl::OUString> >&)
 psp::PrintFontManager::analyzeSfntFile(psp::PrintFontManager::PrintFont&) const
 psp::PrintFontManager::convertSfntName(void*)
-psp::PrintFontManager::countFontconfigFonts(std::unordered_map<rtl::OString, 
int, std::hash<rtl::OString>, std::equal_to<rtl::OString>, 
std::allocator<std::pair<rtl::OString const, int> > >&)
+psp::PrintFontManager::countFontconfigFonts()
 psp::PrintFontManager::createFontSubset(FontSubsetInfo&, int, rtl::OUString 
const&, unsigned short const*, unsigned char const*, int*, int)
 psp::PrintFontManager::deinitFontconfig()
 psp::PrintFontManager::fillPrintFontInfo(psp::PrintFontManager::PrintFont 
const&, psp::FastPrintFontInfo&)
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index d16eb30fb185..40294209ba97 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -186,7 +186,7 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
     called from <code>initialize()</code>
     */
     static void initFontconfig();
-    void countFontconfigFonts( std::unordered_map<OString, int>& 
o_rVisitedPaths );
+    void countFontconfigFonts();
     /* deinitialize fontconfig
      */
     static void deinitFontconfig();
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx 
b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 3c0f8052bd6e..4546de18162a 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -569,7 +569,7 @@ namespace
     }
 }
 
-void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int>& 
o_rVisitedPaths )
+void PrintFontManager::countFontconfigFonts()
 {
     int nFonts = 0;
     FontCfgWrapper& rWrapper = FontCfgWrapper::get();
@@ -637,8 +637,6 @@ void PrintFontManager::countFontconfigFonts( 
std::unordered_map<OString, int>& o
             OString aDir, aBase, aOrgPath( reinterpret_cast<char*>(file) );
             splitPath( aOrgPath, aDir, aBase );
 
-            o_rVisitedPaths[aDir] = 1;
-
             int nDirID = getDirectoryAtom( aDir );
             SAL_INFO("vcl.fonts.detail", "file " << aBase << " not cached");
             // not known, analyze font file to get attributes
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx 
b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 86b5b1b435e3..bee1f4d4d92b 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -713,11 +713,7 @@ void PrintFontManager::initialize()
         } while( nIndex >= 0 );
     }
 
-    // protect against duplicate paths
-    std::unordered_map< OString, int > visited_dirs;
-
-    // Don't search directories that fontconfig already did
-    countFontconfigFonts( visited_dirs );
+    countFontconfigFonts();
 
 #if OSL_DEBUG_LEVEL > 1
     aStep1 = times( &tms );

Reply via email to