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 | |
parent | 0f98299f7aa44bbb55c1bfeddca7799f727d14b0 (diff) |
V813: Decreased performance
Change-Id: I8a7528366156b288dc422b09cff0d5a32cde3c91
Diffstat (limited to 'shell')
-rw-r--r-- | shell/inc/internal/metainforeader.hxx | 8 | ||||
-rw-r--r-- | shell/inc/internal/thumbviewer.hxx | 2 | ||||
-rw-r--r-- | shell/source/win32/ooofilereader/autostyletag.cxx | 2 | ||||
-rw-r--r-- | shell/source/win32/ooofilereader/autostyletag.hxx | 2 | ||||
-rw-r--r-- | shell/source/win32/ooofilereader/metainforeader.cxx | 10 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/shlxthdl.cxx | 4 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/shell/inc/internal/metainforeader.hxx b/shell/inc/internal/metainforeader.hxx index b9f86fd1756b..047bf77683c0 100644 --- a/shell/inc/internal/metainforeader.hxx +++ b/shell/inc/internal/metainforeader.hxx @@ -43,7 +43,7 @@ public: @param TagName the name of the tag that will be retrieved. */ - bool hasTag(std::wstring TagName) const; + bool hasTag(const std::wstring& TagName) const; /** Get a specific tag content, compound tags will be returned as comma separated list. @@ -51,7 +51,7 @@ public: @param TagName the name of the tag that will be retrieved. */ - std::wstring getTagData( const std::wstring& TagName); + std::wstring getTagData(const std::wstring& TagName); /** check if the a tag has the specific attribute. @@ -60,7 +60,7 @@ public: @param AttributeName the name of the attribute. */ - bool hasTagAttribute( const std::wstring TagName, std::wstring AttributeName); + bool hasTagAttribute(const std::wstring& TagName, const std::wstring& AttributeName); /** Get a specific attribute content. @@ -69,7 +69,7 @@ public: @param AttributeName the name of the attribute. */ - std::wstring getTagAttribute( const std::wstring TagName, std::wstring AttributeName); + std::wstring getTagAttribute(const std::wstring& TagName, const std::wstring& AttributeName); /** Get the default language of the whole document. */ diff --git a/shell/inc/internal/thumbviewer.hxx b/shell/inc/internal/thumbviewer.hxx index b6f9ea4b0916..8a3bbed166af 100644 --- a/shell/inc/internal/thumbviewer.hxx +++ b/shell/inc/internal/thumbviewer.hxx @@ -98,7 +98,7 @@ public: /* [out] */ LPOLESTR __RPC_FAR *ppszFileName); private: - Gdiplus::Rect CalcScaledAspectRatio(Gdiplus::Rect src, Gdiplus::Rect dest); + Gdiplus::Rect CalcScaledAspectRatio(const Gdiplus::Rect& src, const Gdiplus::Rect& dest); private: long ref_count_; 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) |