diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-11-04 21:43:54 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-11-04 21:48:04 +0100 |
commit | e6ea58e49ee079772e0a0796cdfb5151af316a6b (patch) | |
tree | 69057f5d20805f3579f068a06403a6262a1cf3a4 | |
parent | a76daca815e9331d8019a60d1a784e5dae86edf3 (diff) |
cppcheck: fix '<type>::operator=' should return '<type> &'.
See http://nabble.documentfoundation.org/About-quot-assignment-operators-quot-cppcheck-warning-td4081208.html
Change-Id: Ie351058a30c5d2df5f5ec1327c575e129d022cd2
-rw-r--r-- | avmedia/source/vlc/wrapper/Instance.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/Instance.hxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/Media.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/Media.hxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/Player.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/Player.hxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpmargins.hxx | 5 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpshadow.hxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.hxx | 2 |
9 files changed, 13 insertions, 11 deletions
diff --git a/avmedia/source/vlc/wrapper/Instance.cxx b/avmedia/source/vlc/wrapper/Instance.cxx index a6a71d1120c1..23ddef67469b 100644 --- a/avmedia/source/vlc/wrapper/Instance.cxx +++ b/avmedia/source/vlc/wrapper/Instance.cxx @@ -49,7 +49,7 @@ namespace wrapper operator=( other ); } - const Instance& Instance::operator=( const Instance& other ) + Instance& Instance::operator=( const Instance& other ) { libvlc_release( mInstance ); mInstance = other.mInstance; diff --git a/avmedia/source/vlc/wrapper/Instance.hxx b/avmedia/source/vlc/wrapper/Instance.hxx index 0f8c6f987989..0432bf14c9c6 100644 --- a/avmedia/source/vlc/wrapper/Instance.hxx +++ b/avmedia/source/vlc/wrapper/Instance.hxx @@ -24,7 +24,7 @@ namespace wrapper static bool LoadSymbols(); Instance( int argc, const char * const argv[] ); Instance( const Instance& other ); - const Instance& operator=( const Instance& other ); + Instance& operator=( const Instance& other ); virtual ~Instance(); inline operator libvlc_instance_t*() diff --git a/avmedia/source/vlc/wrapper/Media.cxx b/avmedia/source/vlc/wrapper/Media.cxx index d48ad49619e2..0ab140f89da7 100644 --- a/avmedia/source/vlc/wrapper/Media.cxx +++ b/avmedia/source/vlc/wrapper/Media.cxx @@ -74,7 +74,7 @@ Media::Media( const Media& other ) operator=( other ); } -const Media& Media::operator=( const Media& other ) +Media& Media::operator=( const Media& other ) { libvlc_media_release( mMedia ); mMedia = other.mMedia; diff --git a/avmedia/source/vlc/wrapper/Media.hxx b/avmedia/source/vlc/wrapper/Media.hxx index 26627eb90eb2..0cdadf0d33c9 100644 --- a/avmedia/source/vlc/wrapper/Media.hxx +++ b/avmedia/source/vlc/wrapper/Media.hxx @@ -27,7 +27,7 @@ namespace wrapper static bool LoadSymbols(); Media( const rtl::OUString& url, Instance& instance ); Media( const Media& other ); - const Media& operator=( const Media& other ); + Media& operator=( const Media& other ); int getDuration() const; diff --git a/avmedia/source/vlc/wrapper/Player.cxx b/avmedia/source/vlc/wrapper/Player.cxx index cd572675c615..2d38e3ad71a8 100644 --- a/avmedia/source/vlc/wrapper/Player.cxx +++ b/avmedia/source/vlc/wrapper/Player.cxx @@ -117,7 +117,7 @@ namespace wrapper operator=( other ); } - const Player& Player::operator=( const Player& other ) + Player& Player::operator=( const Player& other ) { libvlc_media_player_release( mPlayer ); mPlayer = other.mPlayer; diff --git a/avmedia/source/vlc/wrapper/Player.hxx b/avmedia/source/vlc/wrapper/Player.hxx index 05101977ef03..77e45914f2b6 100644 --- a/avmedia/source/vlc/wrapper/Player.hxx +++ b/avmedia/source/vlc/wrapper/Player.hxx @@ -33,7 +33,7 @@ namespace wrapper static bool LoadSymbols(); Player( Media& media ); Player( const Player& other ); - const Player& operator=( const Player& other ); + Player& operator=( const Player& other ); virtual ~Player(); bool play(); diff --git a/lotuswordpro/source/filter/lwpmargins.hxx b/lotuswordpro/source/filter/lwpmargins.hxx index 3ceb52af22ae..bcd455df323c 100644 --- a/lotuswordpro/source/filter/lwpmargins.hxx +++ b/lotuswordpro/source/filter/lwpmargins.hxx @@ -78,7 +78,7 @@ public: m_nBottom = pStrm->QuickReadInt32(); pStrm->SkipExtra(); } - inline void operator = (const LwpMargins& rOther); + inline LwpMargins& operator = (const LwpMargins& rOther); inline double GetMarginsValue(const sal_uInt8& nWhichSide); private: sal_Int32 m_nLeft; @@ -87,12 +87,13 @@ private: sal_Int32 m_nBottom; }; -inline void LwpMargins::operator = (const LwpMargins& rOther) +inline LwpMargins& LwpMargins::operator = (const LwpMargins& rOther) { m_nLeft = rOther.m_nLeft; m_nTop = rOther.m_nTop; m_nRight = rOther.m_nRight; m_nBottom = rOther.m_nBottom; + return *this; } inline double LwpMargins::GetMarginsValue(const sal_uInt8& nWhichSide) diff --git a/lotuswordpro/source/filter/lwpshadow.hxx b/lotuswordpro/source/filter/lwpshadow.hxx index 98f7f2b92015..e064bbc4997b 100644 --- a/lotuswordpro/source/filter/lwpshadow.hxx +++ b/lotuswordpro/source/filter/lwpshadow.hxx @@ -83,7 +83,7 @@ public: LwpColor GetColor(); //add by , 01/26/2005 - inline void operator = (const LwpShadow& rOther); + inline LwpShadow& operator = (const LwpShadow& rOther); //end add private: @@ -108,11 +108,12 @@ inline LwpColor LwpShadow::GetColor() return m_aColor; } -inline void LwpShadow::operator = (const LwpShadow& rOther) +inline LwpShadow& LwpShadow::operator = (const LwpShadow& rOther) { m_aColor = rOther.m_aColor; m_nDirX = rOther.m_nDirX; m_nDirY = rOther.m_nDirY; + return *this; } #endif diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 938b932a13e7..5086dfaa9e23 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -75,7 +75,7 @@ public: PropValue() : m_aValue(), m_bGrabBag() {} - const PropValue& operator=(const PropValue& rProp) { m_aValue = rProp.m_aValue; m_bGrabBag = rProp.m_bGrabBag; return *this; } + PropValue& operator=(const PropValue& rProp) { m_aValue = rProp.m_aValue; m_bGrabBag = rProp.m_bGrabBag; return *this; } const uno::Any& getValue() const { return m_aValue; } bool hasGrabBag() const { return m_bGrabBag; } |