summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-24 14:29:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-25 08:12:17 +0200
commit4a340e36e8d3713806719351f455711c1254a178 (patch)
tree4be5ffdd176b2f45e4f549f7eb4d88da9225c18e /vcl
parent50fc62ce76bc51f18b16eae937761d0a8872df3e (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')
-rw-r--r--vcl/inc/opengl/texture.hxx6
-rw-r--r--vcl/inc/unx/fontmanager.hxx2
-rw-r--r--vcl/opengl/RenderList.cxx2
-rw-r--r--vcl/opengl/texture.cxx8
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx6
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx6
6 files changed, 15 insertions, 15 deletions
diff --git a/vcl/inc/opengl/texture.hxx b/vcl/inc/opengl/texture.hxx
index 3485c4f332a1..2aca8ddfd874 100644
--- a/vcl/inc/opengl/texture.hxx
+++ b/vcl/inc/opengl/texture.hxx
@@ -121,15 +121,15 @@ public:
bool operator!=( const OpenGLTexture& rTexture ) const;
template<GLenum type>
- void FillCoords(std::vector<GLfloat>& aCoordVector, const SalTwoRect& rPosAry, bool bInverted) const;
+ void FillCoords(std::vector<GLfloat>& aCoordVector, const SalTwoRect& rPosAry) const;
};
template<> void OpenGLTexture::FillCoords<GL_TRIANGLES>(
- std::vector<GLfloat>& aCoord, const SalTwoRect& rPosAry, bool bInverted)
+ std::vector<GLfloat>& aCoord, const SalTwoRect& rPosAry)
const;
template<> void OpenGLTexture::FillCoords<GL_TRIANGLE_FAN>(
- std::vector<GLfloat>& aCoord, const SalTwoRect& rPosAry, bool bInverted)
+ std::vector<GLfloat>& aCoord, const SalTwoRect& rPosAry)
const;
#endif // INCLUDED_VCL_INC_OPENGL_TEXTURE_H
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index 2e89c5f655be..34cec8f45e38 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -190,7 +190,7 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
void fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo ) const;
OString getDirectory( int nAtom ) const;
- int getDirectoryAtom( const OString& rDirectory, bool bCreate = false );
+ int getDirectoryAtom( const OString& rDirectory );
/* try to initialize fonts from libfontconfig
diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx
index 4c191fd8896b..dd6502e8ce57 100644
--- a/vcl/opengl/RenderList.cxx
+++ b/vcl/opengl/RenderList.cxx
@@ -365,7 +365,7 @@ bool RenderList::addDrawTextureWithMaskColor(OpenGLTexture& rTexture, SalColor n
RenderTextureParameters& rTextureParameter = maRenderEntries.back().maTextureParametersMap[nTextureId];
rTextureParameter.maTexture = rTexture;
- rTexture.FillCoords<GL_TRIANGLES>(rTextureParameter.maTextureCoords, r2Rect, false);
+ rTexture.FillCoords<GL_TRIANGLES>(rTextureParameter.maTextureCoords, r2Rect);
vcl::vertex::addRectangle<GL_TRIANGLES>(rTextureParameter.maVertices, fX1, fY1, fX2, fY2);
vcl::vertex::addQuadColors<GL_TRIANGLES>(rTextureParameter.maColors, nColor, 0.0f);
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index 9a3584c4f9cf..21c35518dae7 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -399,14 +399,14 @@ bool OpenGLTexture::GetTextureRect(const SalTwoRect& rPosAry, bool bInverted, GL
}
template <>
-void OpenGLTexture::FillCoords<GL_TRIANGLE_FAN>(std::vector<GLfloat>& rCoords, const SalTwoRect& rPosAry, bool bInverted) const
+void OpenGLTexture::FillCoords<GL_TRIANGLE_FAN>(std::vector<GLfloat>& rCoords, const SalTwoRect& rPosAry) const
{
GLfloat x1 = 0.0f;
GLfloat x2 = 0.0f;
GLfloat y1 = 0.0f;
GLfloat y2 = 0.0f;
- GetTextureRect(rPosAry, bInverted, x1, x2, y1, y2);
+ GetTextureRect(rPosAry, false/*bInverted*/, x1, x2, y1, y2);
rCoords.insert(rCoords.end(), {
x1, y2, x1, y1,
@@ -415,14 +415,14 @@ void OpenGLTexture::FillCoords<GL_TRIANGLE_FAN>(std::vector<GLfloat>& rCoords, c
}
template <>
-void OpenGLTexture::FillCoords<GL_TRIANGLES>(std::vector<GLfloat>& rCoords, const SalTwoRect& rPosAry, bool bInverted) const
+void OpenGLTexture::FillCoords<GL_TRIANGLES>(std::vector<GLfloat>& rCoords, const SalTwoRect& rPosAry) const
{
GLfloat x1 = 0.0f;
GLfloat x2 = 0.0f;
GLfloat y1 = 0.0f;
GLfloat y2 = 0.0f;
- GetTextureRect(rPosAry, bInverted, x1, x2, y1, y2);
+ GetTextureRect(rPosAry, false/*bInverted*/, x1, x2, y1, y2);
rCoords.insert(rCoords.end(), {
x1, y1, x2, y1, x1, y2,
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() )
{