diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-24 14:29:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-25 08:12:17 +0200 |
commit | 4a340e36e8d3713806719351f455711c1254a178 (patch) | |
tree | 4be5ffdd176b2f45e4f549f7eb4d88da9225c18e /vcl/unx/generic/fontmanager | |
parent | 50fc62ce76bc51f18b16eae937761d0a8872df3e (diff) |
loplugin:constantparam
add the results files so I can just see the diff in future
Change-Id: Ia20a1aa6418be95ed620719cde340c00b7b053e1
Reviewed-on: https://gerrit.libreoffice.org/37988
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic/fontmanager')
-rw-r--r-- | vcl/unx/generic/fontmanager/fontconfig.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/fontmanager/fontmanager.cxx | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index 07614f60e399..4b3803231179 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -552,7 +552,7 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OS o_rVisitedPaths[aDir] = 1; - int nDirID = getDirectoryAtom( aDir, true ); + int nDirID = getDirectoryAtom( aDir ); #if OSL_DEBUG_LEVEL > 2 fprintf( stderr, "file %s not cached\n", aBase.getStr() ); #endif @@ -1012,7 +1012,7 @@ void PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi { OString aDir, aBase, aOrgPath( reinterpret_cast<char*>(file) ); splitPath( aOrgPath, aDir, aBase ); - int nDirID = getDirectoryAtom( aDir, true ); + int nDirID = getDirectoryAtom( aDir ); fontID aFont = findFontFileID( nDirID, aBase, nCollectionEntry ); if( aFont > 0 ) { @@ -1252,7 +1252,7 @@ void PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const css::lang::Loc { OString aDir, aBase, aOrgPath( reinterpret_cast<char*>(file) ); splitPath( aOrgPath, aDir, aBase ); - int nDirID = getDirectoryAtom( aDir, true ); + int nDirID = getDirectoryAtom( aDir ); fontID aFont = findFontFileID( nDirID, aBase, nCollectionEntry ); if( aFont > 0 ) getFontFastInfo( aFont, rInfo ); diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index 2b961e58fa06..715223809afa 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -154,14 +154,14 @@ OString PrintFontManager::getDirectory( int nAtom ) const return it != m_aAtomToDir.end() ? it->second : OString(); } -int PrintFontManager::getDirectoryAtom( const OString& rDirectory, bool bCreate ) +int PrintFontManager::getDirectoryAtom( const OString& rDirectory ) { int nAtom = 0; std::unordered_map< OString, int, OStringHash >::const_iterator it ( m_aDirToAtom.find( rDirectory ) ); if( it != m_aDirToAtom.end() ) nAtom = it->second; - else if( bCreate ) + else { nAtom = m_nNextDirAtom++; m_aDirToAtom[ rDirectory ] = nAtom; @@ -178,7 +178,7 @@ std::vector<fontID> PrintFontManager::addFontFile( const OString& rFileName ) OString aDir( OUStringToOString( INetURLObject::decode( aPath.GetPath(), INetURLObject::DecodeMechanism::WithCharset, aEncoding ), aEncoding ) ); - int nDirID = getDirectoryAtom( aDir, true ); + int nDirID = getDirectoryAtom( aDir ); std::vector<fontID> aFontIds = findFontFileIDs( nDirID, aName ); if( aFontIds.empty() ) { |