diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-12 15:52:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-13 09:22:40 +0200 |
commit | 54a97eb9ddd66294f303189ca12ef726177453cb (patch) | |
tree | fc068c028f44ef859021bf4b1a66daa29491a20d /vcl/source/font | |
parent | 72f631977435a704008a55d3be6489ba619e3064 (diff) |
clang-tidy modernize-pass-by-value in vcl
Change-Id: I9ddb786eb88213c53cf53067ced6899ca40ac6e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137000
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/font')
-rw-r--r-- | vcl/source/font/Feature.cxx | 8 | ||||
-rw-r--r-- | vcl/source/font/FontSelectPattern.cxx | 5 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontFamily.cxx | 5 | ||||
-rw-r--r-- | vcl/source/font/fontcharmap.cxx | 5 |
4 files changed, 13 insertions, 10 deletions
diff --git a/vcl/source/font/Feature.cxx b/vcl/source/font/Feature.cxx index ba4b09a5def0..ac2592f12f99 100644 --- a/vcl/source/font/Feature.cxx +++ b/vcl/source/font/Feature.cxx @@ -94,11 +94,11 @@ FeatureDefinition::FeatureDefinition() { } -FeatureDefinition::FeatureDefinition(uint32_t nCode, OUString const& rDescription, +FeatureDefinition::FeatureDefinition(uint32_t nCode, OUString aDescription, FeatureParameterType eType, std::vector<FeatureParameter>&& rEnumParameters, uint32_t nDefault) - : m_sDescription(rDescription) + : m_sDescription(std::move(aDescription)) , m_nCode(nCode) , m_nDefault(nDefault) , m_eType(eType) @@ -107,9 +107,9 @@ FeatureDefinition::FeatureDefinition(uint32_t nCode, OUString const& rDescriptio } FeatureDefinition::FeatureDefinition(uint32_t nCode, TranslateId pDescriptionID, - OUString const& rNumericPart) + OUString aNumericPart) : m_pDescriptionID(pDescriptionID) - , m_sNumericPart(rNumericPart) + , m_sNumericPart(std::move(aNumericPart)) , m_nCode(nCode) , m_nDefault(0) , m_eType(FeatureParameterType::BOOL) diff --git a/vcl/source/font/FontSelectPattern.cxx b/vcl/source/font/FontSelectPattern.cxx index 23e7673c8da2..30c2c9aaa574 100644 --- a/vcl/source/font/FontSelectPattern.cxx +++ b/vcl/source/font/FontSelectPattern.cxx @@ -21,6 +21,7 @@ #include <o3tl/safeint.hxx> #include <tools/gen.hxx> +#include <utility> #include <vcl/font.hxx> #include <font/FontSelectPattern.hxx> @@ -34,8 +35,8 @@ const char FontSelectPattern::FEAT_PREFIX = ':'; const char FontSelectPattern::FEAT_SEPARATOR = '&'; FontSelectPattern::FontSelectPattern( const vcl::Font& rFont, - const OUString& rSearchName, const Size& rSize, float fExactHeight, bool bNonAntialias) - : maSearchName( rSearchName ) + OUString aSearchName, const Size& rSize, float fExactHeight, bool bNonAntialias) + : maSearchName(std::move( aSearchName )) , mnWidth( rSize.Width() ) , mnHeight( rSize.Height() ) , mfExactHeight( fExactHeight) diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx index b402cd6185e8..b95cbc117bd7 100644 --- a/vcl/source/font/PhysicalFontFamily.cxx +++ b/vcl/source/font/PhysicalFontFamily.cxx @@ -24,6 +24,7 @@ #include <font/PhysicalFontFaceCollection.hxx> #include <font/PhysicalFontCollection.hxx> +#include <utility> namespace vcl::font { @@ -92,8 +93,8 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName ) return ImplFontAttrs::None; } -PhysicalFontFamily::PhysicalFontFamily( const OUString& rSearchName ) -: maSearchName( rSearchName ), +PhysicalFontFamily::PhysicalFontFamily( OUString aSearchName ) +: maSearchName(std::move( aSearchName )), mnTypeFaces( FontTypeFaces::NONE ), meFamily( FAMILY_DONTKNOW ), mePitch( PITCH_DONTKNOW ), diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx index 7ca3e56a2f8c..d1d022c26eed 100644 --- a/vcl/source/font/fontcharmap.cxx +++ b/vcl/source/font/fontcharmap.cxx @@ -15,6 +15,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vcl/fontcharmap.hxx> #include <impfontcharmap.hxx> #include <rtl/textcvt.h> @@ -431,8 +432,8 @@ FontCharMap::FontCharMap() { } -FontCharMap::FontCharMap( ImplFontCharMapRef const & pIFCMap ) - : mpImplFontCharMap( pIFCMap ) +FontCharMap::FontCharMap( ImplFontCharMapRef pIFCMap ) + : mpImplFontCharMap(std::move( pIFCMap )) { } |