diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-04 09:28:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-04 13:07:40 +0000 |
commit | 32f95a35514701ed16413125b440c16d90f52b4a (patch) | |
tree | 25ac5edca15ee02bc937ee47116c2197559da4cd /shell/source/win32 | |
parent | 0f98299f7aa44bbb55c1bfeddca7799f727d14b0 (diff) |
V813: Decreased performance
Change-Id: I8a7528366156b288dc422b09cff0d5a32cde3c91
Diffstat (limited to 'shell/source/win32')
5 files changed, 10 insertions, 10 deletions
diff --git a/shell/source/win32/ooofilereader/autostyletag.cxx b/shell/source/win32/ooofilereader/autostyletag.cxx index d6c3c149b40e..f2220d91549a 100644 --- a/shell/source/win32/ooofilereader/autostyletag.cxx +++ b/shell/source/win32/ooofilereader/autostyletag.cxx @@ -77,7 +77,7 @@ void CAutoStyleTag::setStyle( ::std::wstring const & Style ) m_CurrentStyleLocalePair.first = Style; } -void CAutoStyleTag::setLocale( LocaleSet_t Locale ) +void CAutoStyleTag::setLocale(const LocaleSet_t& Locale) { m_CurrentStyleLocalePair.second = Locale; } diff --git a/shell/source/win32/ooofilereader/autostyletag.hxx b/shell/source/win32/ooofilereader/autostyletag.hxx index 3982b0c48758..6b2140f34ec7 100644 --- a/shell/source/win32/ooofilereader/autostyletag.hxx +++ b/shell/source/win32/ooofilereader/autostyletag.hxx @@ -48,7 +48,7 @@ class CAutoStyleTag : public ITag virtual ::std::wstring const getTagAttribute( ::std::wstring const & /*attrname*/ ){ return ::std::wstring() ; }; void setStyle( ::std::wstring const & Style ); - void setLocale( LocaleSet_t Locale ); + void setLocale(const LocaleSet_t& Locale); void clearStyleLocalePair( void ); inline StyleLocalePair_t getStyleLocalePair() const{ return m_CurrentStyleLocalePair; }; inline bool isFull() const diff --git a/shell/source/win32/ooofilereader/metainforeader.cxx b/shell/source/win32/ooofilereader/metainforeader.cxx index cc3fdd87545d..be0c7ee5576e 100644 --- a/shell/source/win32/ooofilereader/metainforeader.cxx +++ b/shell/source/win32/ooofilereader/metainforeader.cxx @@ -132,7 +132,7 @@ CMetaInfoReader::~CMetaInfoReader( void ) @param TagName the name of the tag that will be retrieve. */ -bool CMetaInfoReader::hasTag( std::wstring TagName ) const +bool CMetaInfoReader::hasTag(const std::wstring& TagName) const { return ( m_AllMetaInfo.find(TagName) != m_AllMetaInfo.end()); } @@ -157,7 +157,7 @@ std::wstring CMetaInfoReader::getTagData( const std::wstring& TagName) @param AttributeName the name of the attribute. */ -bool CMetaInfoReader::hasTagAttribute( const std::wstring TagName, std::wstring AttributeName) +bool CMetaInfoReader::hasTagAttribute(const std::wstring& TagName, const std::wstring& AttributeName) { return ( m_AllMetaInfo[TagName].second.find( AttributeName) != m_AllMetaInfo[TagName].second.end() ); } @@ -169,9 +169,9 @@ bool CMetaInfoReader::hasTagAttribute( const std::wstring TagName, std::wstring @param AttributeName the name of the attribute. */ -std::wstring CMetaInfoReader::getTagAttribute( const std::wstring TagName, std::wstring AttributeName) +std::wstring CMetaInfoReader::getTagAttribute(const std::wstring& TagName, const std::wstring& AttributeName) { - if ( hasTagAttribute( TagName, AttributeName ) ) + if (hasTagAttribute(TagName, AttributeName)) return m_AllMetaInfo[ TagName ].second[AttributeName]; else return EMPTY_STRING; @@ -181,7 +181,7 @@ std::wstring CMetaInfoReader::getTagAttribute( const std::wstring TagName, std: */ const LocaleSet_t EN_US_LOCALE( ::std::make_pair( ::std::wstring( L"en" ), ::std::wstring( L"US" ))); -bool isValidLocale ( ::std::wstring Locale ) +bool isValidLocale(const ::std::wstring& Locale) { return ( Locale.length() == 5 ); } diff --git a/shell/source/win32/shlxthandler/shlxthdl.cxx b/shell/source/win32/shlxthandler/shlxthdl.cxx index 74357bfddc34..80460e8fe4d7 100644 --- a/shell/source/win32/shlxthandler/shlxthdl.cxx +++ b/shell/source/win32/shlxthandler/shlxthdl.cxx @@ -263,7 +263,7 @@ namespace /* private */ /** Approving/Unapproving the Shell Extension, it's important under Windows NT/2000/XP, see MSDN: Creating Shell Extension Handlers */ - HRESULT ApproveShellExtension(CLSID clsid, const std::wstring& Description) + HRESULT ApproveShellExtension(const CLSID& clsid, const std::wstring& Description) { bool bRet = SetRegistryKey( HKEY_LOCAL_MACHINE, @@ -274,7 +274,7 @@ namespace /* private */ return bRet ? S_OK : E_FAIL; } - HRESULT UnapproveShellExtension(CLSID Clsid) + HRESULT UnapproveShellExtension(const CLSID& Clsid) { HKEY hkey; diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx index c3f883d34dee..6519a96fc610 100644 --- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx +++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx @@ -517,7 +517,7 @@ HRESULT STDMETHODCALLTYPE CThumbviewer::GetCurFile(LPOLESTR __RPC_FAR*) { return E_NOTIMPL; } -Gdiplus::Rect CThumbviewer::CalcScaledAspectRatio(Gdiplus::Rect src, Gdiplus::Rect dest) +Gdiplus::Rect CThumbviewer::CalcScaledAspectRatio(const Gdiplus::Rect& src, const Gdiplus::Rect& dest) { Gdiplus::Rect result; if (src.Width >= src.Height) |