cppcheck: fix '<type>::operator=' should return '<type> &'.
See http://nabble.documentfoundation.org/About-quot-assignment-operators-quot-cppcheck-warning-td4081208.html Change-Id: Ie351058a30c5d2df5f5ec1327c575e129d022cd2
This commit is contained in:
@@ -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;
|
||||
|
@@ -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*()
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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; }
|
||||
|
Reference in New Issue
Block a user