Bug 629200 part 5 - Add assignment operator to nsAttrValue; r=bz

This commit is contained in:
Brian Birtles 2012-02-07 15:54:39 +09:00
Родитель 457dcc152c
Коммит 935f0a8224
2 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -171,6 +171,10 @@ nsAttrValue::Reset()
void
nsAttrValue::SetTo(const nsAttrValue& aOther)
{
if (this == &aOther) {
return;
}
switch (aOther.BaseType()) {
case eStringBase:
{

Просмотреть файл

@ -106,6 +106,8 @@ public:
explicit nsAttrValue(const nsIntMargin& aValue);
~nsAttrValue();
inline const nsAttrValue& operator=(const nsAttrValue& aOther);
static nsresult Init();
static void Shutdown();
@ -397,6 +399,13 @@ private:
* Implementation of inline methods
*/
inline const nsAttrValue&
nsAttrValue::operator=(const nsAttrValue& aOther)
{
SetTo(aOther);
return *this;
}
inline nsIAtom*
nsAttrValue::GetAtomValue() const
{