avmedia/source/vlc/wrapper/Instance.cxx | 2 +- avmedia/source/vlc/wrapper/Instance.hxx | 2 +- avmedia/source/vlc/wrapper/Media.cxx | 2 +- avmedia/source/vlc/wrapper/Media.hxx | 2 +- avmedia/source/vlc/wrapper/Player.cxx | 2 +- avmedia/source/vlc/wrapper/Player.hxx | 2 +- lotuswordpro/source/filter/lwpmargins.hxx | 5 +++-- lotuswordpro/source/filter/lwpshadow.hxx | 5 +++-- writerfilter/source/dmapper/PropertyMap.hxx | 2 +- 9 files changed, 13 insertions(+), 11 deletions(-)
New commits: commit e6ea58e49ee079772e0a0796cdfb5151af316a6b Author: Julien Nabet <[email protected]> Date: Mon Nov 4 21:43:54 2013 +0100 cppcheck: fix '<type>::operator=' should return '<type> &'. See http://nabble.documentfoundation.org/About-quot-assignment-operators-quot-cppcheck-warning-td4081208.html Change-Id: Ie351058a30c5d2df5f5ec1327c575e129d022cd2 diff --git a/avmedia/source/vlc/wrapper/Instance.cxx b/avmedia/source/vlc/wrapper/Instance.cxx index a6a71d1..23ddef6 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 0f8c6f9..0432bf1 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 d48ad49..0ab140f 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 26627eb..0cdadf0 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 cd57267..2d38e3a 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 0510197..77e4591 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 3ceb52a..bcd455d 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 98f7f2b..e064bbc 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 938b932a..5086dfa 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; } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
