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 );
|
operator=( other );
|
||||||
}
|
}
|
||||||
|
|
||||||
const Instance& Instance::operator=( const Instance& other )
|
Instance& Instance::operator=( const Instance& other )
|
||||||
{
|
{
|
||||||
libvlc_release( mInstance );
|
libvlc_release( mInstance );
|
||||||
mInstance = other.mInstance;
|
mInstance = other.mInstance;
|
||||||
|
@@ -24,7 +24,7 @@ namespace wrapper
|
|||||||
static bool LoadSymbols();
|
static bool LoadSymbols();
|
||||||
Instance( int argc, const char * const argv[] );
|
Instance( int argc, const char * const argv[] );
|
||||||
Instance( const Instance& other );
|
Instance( const Instance& other );
|
||||||
const Instance& operator=( const Instance& other );
|
Instance& operator=( const Instance& other );
|
||||||
virtual ~Instance();
|
virtual ~Instance();
|
||||||
|
|
||||||
inline operator libvlc_instance_t*()
|
inline operator libvlc_instance_t*()
|
||||||
|
@@ -74,7 +74,7 @@ Media::Media( const Media& other )
|
|||||||
operator=( other );
|
operator=( other );
|
||||||
}
|
}
|
||||||
|
|
||||||
const Media& Media::operator=( const Media& other )
|
Media& Media::operator=( const Media& other )
|
||||||
{
|
{
|
||||||
libvlc_media_release( mMedia );
|
libvlc_media_release( mMedia );
|
||||||
mMedia = other.mMedia;
|
mMedia = other.mMedia;
|
||||||
|
@@ -27,7 +27,7 @@ namespace wrapper
|
|||||||
static bool LoadSymbols();
|
static bool LoadSymbols();
|
||||||
Media( const rtl::OUString& url, Instance& instance );
|
Media( const rtl::OUString& url, Instance& instance );
|
||||||
Media( const Media& other );
|
Media( const Media& other );
|
||||||
const Media& operator=( const Media& other );
|
Media& operator=( const Media& other );
|
||||||
|
|
||||||
int getDuration() const;
|
int getDuration() const;
|
||||||
|
|
||||||
|
@@ -117,7 +117,7 @@ namespace wrapper
|
|||||||
operator=( other );
|
operator=( other );
|
||||||
}
|
}
|
||||||
|
|
||||||
const Player& Player::operator=( const Player& other )
|
Player& Player::operator=( const Player& other )
|
||||||
{
|
{
|
||||||
libvlc_media_player_release( mPlayer );
|
libvlc_media_player_release( mPlayer );
|
||||||
mPlayer = other.mPlayer;
|
mPlayer = other.mPlayer;
|
||||||
|
@@ -33,7 +33,7 @@ namespace wrapper
|
|||||||
static bool LoadSymbols();
|
static bool LoadSymbols();
|
||||||
Player( Media& media );
|
Player( Media& media );
|
||||||
Player( const Player& other );
|
Player( const Player& other );
|
||||||
const Player& operator=( const Player& other );
|
Player& operator=( const Player& other );
|
||||||
virtual ~Player();
|
virtual ~Player();
|
||||||
|
|
||||||
bool play();
|
bool play();
|
||||||
|
@@ -78,7 +78,7 @@ public:
|
|||||||
m_nBottom = pStrm->QuickReadInt32();
|
m_nBottom = pStrm->QuickReadInt32();
|
||||||
pStrm->SkipExtra();
|
pStrm->SkipExtra();
|
||||||
}
|
}
|
||||||
inline void operator = (const LwpMargins& rOther);
|
inline LwpMargins& operator = (const LwpMargins& rOther);
|
||||||
inline double GetMarginsValue(const sal_uInt8& nWhichSide);
|
inline double GetMarginsValue(const sal_uInt8& nWhichSide);
|
||||||
private:
|
private:
|
||||||
sal_Int32 m_nLeft;
|
sal_Int32 m_nLeft;
|
||||||
@@ -87,12 +87,13 @@ private:
|
|||||||
sal_Int32 m_nBottom;
|
sal_Int32 m_nBottom;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void LwpMargins::operator = (const LwpMargins& rOther)
|
inline LwpMargins& LwpMargins::operator = (const LwpMargins& rOther)
|
||||||
{
|
{
|
||||||
m_nLeft = rOther.m_nLeft;
|
m_nLeft = rOther.m_nLeft;
|
||||||
m_nTop = rOther.m_nTop;
|
m_nTop = rOther.m_nTop;
|
||||||
m_nRight = rOther.m_nRight;
|
m_nRight = rOther.m_nRight;
|
||||||
m_nBottom = rOther.m_nBottom;
|
m_nBottom = rOther.m_nBottom;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double LwpMargins::GetMarginsValue(const sal_uInt8& nWhichSide)
|
inline double LwpMargins::GetMarginsValue(const sal_uInt8& nWhichSide)
|
||||||
|
@@ -83,7 +83,7 @@ public:
|
|||||||
LwpColor GetColor();
|
LwpColor GetColor();
|
||||||
|
|
||||||
//add by , 01/26/2005
|
//add by , 01/26/2005
|
||||||
inline void operator = (const LwpShadow& rOther);
|
inline LwpShadow& operator = (const LwpShadow& rOther);
|
||||||
//end add
|
//end add
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -108,11 +108,12 @@ inline LwpColor LwpShadow::GetColor()
|
|||||||
return m_aColor;
|
return m_aColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void LwpShadow::operator = (const LwpShadow& rOther)
|
inline LwpShadow& LwpShadow::operator = (const LwpShadow& rOther)
|
||||||
{
|
{
|
||||||
m_aColor = rOther.m_aColor;
|
m_aColor = rOther.m_aColor;
|
||||||
m_nDirX = rOther.m_nDirX;
|
m_nDirX = rOther.m_nDirX;
|
||||||
m_nDirY = rOther.m_nDirY;
|
m_nDirY = rOther.m_nDirY;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ public:
|
|||||||
|
|
||||||
PropValue() : m_aValue(), m_bGrabBag() {}
|
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; }
|
const uno::Any& getValue() const { return m_aValue; }
|
||||||
bool hasGrabBag() const { return m_bGrabBag; }
|
bool hasGrabBag() const { return m_bGrabBag; }
|
||||||
|
Reference in New Issue
Block a user