From 4618de024845573e33324539a7b455cd274a5fc3 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 7 Mar 2022 11:33:49 +0200 Subject: 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 --- vcl/unx/generic/fontmanager/fontconfig.cxx | 4 +--- vcl/unx/generic/fontmanager/fontmanager.cxx | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'vcl/unx/generic') 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& o_rVisitedPaths ) +void PrintFontManager::countFontconfigFonts() { int nFonts = 0; FontCfgWrapper& rWrapper = FontCfgWrapper::get(); @@ -637,8 +637,6 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map& o OString aDir, aBase, aOrgPath( reinterpret_cast(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 ); -- cgit