diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-11 15:29:25 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-12 06:32:52 +0000 |
commit | 03fd8d24c2e4603731e796b24e51289736c65621 (patch) | |
tree | f88ec680e3339c6ae174cf4f85e6b4da9292cc92 /vcl | |
parent | 0a8abaadf322dca5628c6e62eb18b19394995c40 (diff) |
clang-tidy performance-unnecessary-value-param in vcl
Change-Id: I403f148060891feec56d7d2ef173a9c4934baf9e
Reviewed-on: https://gerrit.libreoffice.org/23995
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/unx/glyphcache.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/screensaverinhibitor.hxx | 2 | ||||
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/embeddedfontshelper.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/accessibility.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/window/screensaverinhibitor.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atkvalue.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 2 |
17 files changed, 24 insertions, 24 deletions
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index 264ceec08321..bcadbb128a3a 100644 --- a/vcl/inc/unx/glyphcache.hxx +++ b/vcl/inc/unx/glyphcache.hxx @@ -154,7 +154,7 @@ public: bool TestFont() const { return mbFaceOk;} FT_Face GetFtFace() const; int GetLoadFlags() const { return (mnLoadFlags & ~FT_LOAD_IGNORE_TRANSFORM); } - void SetFontOptions(std::shared_ptr<FontConfigFontOptions>); + void SetFontOptions(const std::shared_ptr<FontConfigFontOptions>&); std::shared_ptr<FontConfigFontOptions> GetFontOptions() const; bool NeedsArtificialBold() const { return mbArtBold; } bool NeedsArtificialItalic() const { return mbArtItalic; } diff --git a/vcl/inc/unx/screensaverinhibitor.hxx b/vcl/inc/unx/screensaverinhibitor.hxx index deff6d8086b8..80289f4f9e2c 100644 --- a/vcl/inc/unx/screensaverinhibitor.hxx +++ b/vcl/inc/unx/screensaverinhibitor.hxx @@ -25,7 +25,7 @@ class VCL_PLUGIN_PUBLIC ScreenSaverInhibitor { public: void inhibit( bool bInhibit, const rtl::OUString& sReason, - bool bIsX11, const boost::optional<unsigned int> xid, boost::optional<Display*> pDisplay ); + bool bIsX11, const boost::optional<unsigned int>& xid, boost::optional<Display*> pDisplay ); private: // These are all used as guint, however this header may be included diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 90c19d5aed66..32e085fb4fe1 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -671,7 +671,7 @@ inline void addVertex(std::vector<GLfloat>& rVertices, std::vector<GLfloat>& rEx rExtrusionVectors.push_back(length); } -inline void addVertexPair(std::vector<GLfloat>& rVertices, std::vector<GLfloat>& rExtrusionVectors, glm::vec2 point, glm::vec2 extrusionVector, float length) +inline void addVertexPair(std::vector<GLfloat>& rVertices, std::vector<GLfloat>& rExtrusionVectors, const glm::vec2& point, const glm::vec2& extrusionVector, float length) { addVertex(rVertices, rExtrusionVectors, point, -extrusionVector, -length); addVertex(rVertices, rExtrusionVectors, point, extrusionVector, length); diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 03915ea757c2..e60d77c10acd 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -313,7 +313,7 @@ void Bitmap::ImplAssignWithSize( const Bitmap& rBitmap ) } -void Bitmap::ImplSetImpBitmap(std::shared_ptr<ImpBitmap> xImpBmp) +void Bitmap::ImplSetImpBitmap(const std::shared_ptr<ImpBitmap>& xImpBmp) { mxImpBmp = xImpBmp; } diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx index 8378e5c72566..c9f4a5ceab62 100644 --- a/vcl/source/gdi/embeddedfontshelper.cxx +++ b/vcl/source/gdi/embeddedfontshelper.cxx @@ -61,7 +61,7 @@ void EmbeddedFontsHelper::clearTemporaryFontFiles() clearDir( path + "fromsystem/" ); } -bool EmbeddedFontsHelper::addEmbeddedFont( uno::Reference< io::XInputStream > stream, const OUString& fontName, +bool EmbeddedFontsHelper::addEmbeddedFont( const uno::Reference< io::XInputStream >& stream, const OUString& fontName, const char* extra, std::vector< unsigned char > key, bool eot ) { OUString fileUrl = EmbeddedFontsHelper::fileUrlForTemporaryFont( fontName, extra ); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 118f9c92239c..4cc5e0bf47c8 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1008,7 +1008,7 @@ i12626 // helper for playMetafile void implWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& ); - void implWriteBitmapEx( const Point& rPoint, const Size& rSize, const BitmapEx& rBitmapEx, Graphic i_pGraphic, + void implWriteBitmapEx( const Point& rPoint, const Size& rSize, const BitmapEx& rBitmapEx, const Graphic& i_pGraphic, VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& ); // helpers for CCITT 1bit bitmap stream diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 404d0c88c994..9f6274660c45 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -65,7 +65,7 @@ void PDFWriterImpl::implWriteGradient( const tools::PolyPolygon& i_rPolyPoly, co m_rOuterFace.Pop(); } -void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSize, const BitmapEx& i_rBitmapEx, Graphic i_Graphic, +void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSize, const BitmapEx& i_rBitmapEx, const Graphic& i_Graphic, VirtualDevice* i_pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& i_rContext ) { if ( !i_rBitmapEx.IsEmpty() && i_rSize.Width() && i_rSize.Height() ) diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 1633dab15045..d44d4125d0b1 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -511,13 +511,13 @@ bool Printer::ExecutePrintJob(std::shared_ptr<PrinterController> xController) return xController->getPrinter()->StartJob( aJobName, xController ); } -void Printer::FinishPrintJob(std::shared_ptr<PrinterController> xController) +void Printer::FinishPrintJob(const std::shared_ptr<PrinterController>& xController) { xController->resetPaperToLastConfigured(); xController->jobFinished( xController->getJobState() ); } -void Printer::ImplPrintJob(std::shared_ptr<PrinterController> xController, +void Printer::ImplPrintJob(const std::shared_ptr<PrinterController>& xController, const JobSetup& i_rInitSetup) { if (PreparePrintJob(xController, i_rInitSetup)) diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index b3639999a421..e321dd550153 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -149,7 +149,7 @@ css::uno::Reference< css::accessibility::XAccessible > Window::CreateAccessible( return xAcc; } -void Window::SetAccessible( css::uno::Reference< css::accessibility::XAccessible > x ) +void Window::SetAccessible( const css::uno::Reference< css::accessibility::XAccessible >& x ) { mpWindowImpl->mxAccessible = x; } diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 9492e9c0d66b..a1d0a9b5a0af 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -766,7 +766,7 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags ) StartPopupMode( aRect, nFlags ); } -void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, VclPtr<vcl::Window> xFocusId ) +void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPtr<vcl::Window>& xFocusId ) { if ( !mbInPopupMode ) return; diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 457cd9f8006f..9c35022574f9 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1976,7 +1976,7 @@ void Window::set_non_homogeneous(bool bNonHomogeneous) pWindowImpl->mbNonHomogeneous = bNonHomogeneous; } -void Window::add_to_size_group(std::shared_ptr<VclSizeGroup> xGroup) +void Window::add_to_size_group(const std::shared_ptr<VclSizeGroup>& xGroup) { WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; //To-Do, multiple groups diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 0a1024788754..5476dd1fc7a0 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -537,7 +537,7 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI ) mnLoadFlags |= FT_LOAD_NO_BITMAP; } -void ServerFont::SetFontOptions(std::shared_ptr<FontConfigFontOptions> xFontOptions) +void ServerFont::SetFontOptions(const std::shared_ptr<FontConfigFontOptions>& xFontOptions) { mxFontOptions = xFontOptions; diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx index 19ba95c1e7a9..c63916bb6ca0 100644 --- a/vcl/unx/generic/window/screensaverinhibitor.cxx +++ b/vcl/unx/generic/window/screensaverinhibitor.cxx @@ -40,7 +40,7 @@ #include <sal/log.hxx> void ScreenSaverInhibitor::inhibit( bool bInhibit, const OUString& sReason, - bool bIsX11, const boost::optional<unsigned int> xid, boost::optional<Display*> pDisplay ) + bool bIsX11, const boost::optional<unsigned int>& xid, boost::optional<Display*> pDisplay ) { const char* appname = SalGenericSystem::getFrameClassName(); const OString aReason = OUStringToOString( sReason, RTL_TEXTENCODING_UTF8 ); @@ -68,8 +68,8 @@ void ScreenSaverInhibitor::inhibit( bool bInhibit, const OUString& sReason, #if ENABLE_DBUS void dbusInhibit( bool bInhibit, const gchar* service, const gchar* path, const gchar* interface, - std::function<bool( DBusGProxy*, guint&, GError*& )> fInhibit, - std::function<bool( DBusGProxy*, const guint, GError*& )> fUnInhibit, + const std::function<bool( DBusGProxy*, guint&, GError*& )>& fInhibit, + const std::function<bool( DBusGProxy*, const guint, GError*& )>& fUnInhibit, boost::optional<guint>& rCookie ) { if ( ( !bInhibit && ( rCookie == boost::none ) ) || diff --git a/vcl/unx/gtk/a11y/atkvalue.cxx b/vcl/unx/gtk/a11y/atkvalue.cxx index 5e4b943886a3..1d16c9e817b8 100644 --- a/vcl/unx/gtk/a11y/atkvalue.cxx +++ b/vcl/unx/gtk/a11y/atkvalue.cxx @@ -42,7 +42,7 @@ static css::uno::Reference<css::accessibility::XAccessibleValue> return css::uno::Reference<css::accessibility::XAccessibleValue>(); } -static void anyToGValue( uno::Any aAny, GValue *pValue ) +static void anyToGValue( const uno::Any& aAny, GValue *pValue ) { // FIXME: expand to lots of types etc. double aDouble=0; diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 88c4205de60d..d20e1b4dc25f 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -303,19 +303,19 @@ void SAL_CALL SalGtkFilePicker::removeFilePickerListener( const uno::Reference<X // FilePicker Event functions -void SalGtkFilePicker::impl_fileSelectionChanged( FilePickerEvent aEvent ) +void SalGtkFilePicker::impl_fileSelectionChanged( const FilePickerEvent& aEvent ) { OSL_TRACE( "file selection changed"); if (m_xListener.is()) m_xListener->fileSelectionChanged( aEvent ); } -void SalGtkFilePicker::impl_directoryChanged( FilePickerEvent aEvent ) +void SalGtkFilePicker::impl_directoryChanged( const FilePickerEvent& aEvent ) { OSL_TRACE("directory changed"); if (m_xListener.is()) m_xListener->directoryChanged( aEvent ); } -void SalGtkFilePicker::impl_controlStateChanged( FilePickerEvent aEvent ) +void SalGtkFilePicker::impl_controlStateChanged( const FilePickerEvent& aEvent ) { OSL_TRACE("control state changed"); if (m_xListener.is()) m_xListener->controlStateChanged( aEvent ); diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx index e602baaff29f..49190eafedb7 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx @@ -172,9 +172,9 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base void ensureFilterList( const OUString& _rInitialCurrentFilter ); - void impl_fileSelectionChanged( css::ui::dialogs::FilePickerEvent aEvent ); - void impl_directoryChanged( css::ui::dialogs::FilePickerEvent aEvent ); - void impl_controlStateChanged( css::ui::dialogs::FilePickerEvent aEvent ); + void impl_fileSelectionChanged( const css::ui::dialogs::FilePickerEvent& aEvent ); + void impl_directoryChanged( const css::ui::dialogs::FilePickerEvent& aEvent ); + void impl_controlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent ); private: css::uno::Reference< css::ui::dialogs::XFilePickerListener > diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index fec69ff9ec5e..ffdb042941c1 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -3833,7 +3833,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_hand } uno::Reference<accessibility::XAccessibleEditableText> - FindFocus(uno::Reference< accessibility::XAccessibleContext > xContext) + FindFocus(const uno::Reference< accessibility::XAccessibleContext >& xContext) { if (!xContext.is()) uno::Reference< accessibility::XAccessibleEditableText >(); |