summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2022-03-07 11:33:49 +0200
committerTor Lillqvist <tml@collabora.com>2022-03-07 11:47:32 +0100
commit4618de024845573e33324539a7b455cd274a5fc3 (patch)
treed088c12c655e129e96c3583e45626ba0a810636e /vcl
parent604bb64047a243a856ac42ea47786800901378ff (diff)
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 <tml@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/fontmanager.hxx2
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx4
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx6
3 files changed, 3 insertions, 9 deletions
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 );