mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
UserspaceEmulator: Return ValueAndShadowReference& on operator=
This is what normal assign operators do and what clang-tidy expects form us.
This commit is contained in:
parent
c0d6afdc67
commit
584ba7da13
1 changed files with 3 additions and 2 deletions
|
@ -100,7 +100,7 @@ public:
|
||||||
return (m_shadow & 0x01) != 0x01;
|
return (m_shadow & 0x01) != 0x01;
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator=(const ValueWithShadow<T>&);
|
ValueAndShadowReference<T>& operator=(const ValueWithShadow<T>&);
|
||||||
|
|
||||||
T& value() { return m_value; }
|
T& value() { return m_value; }
|
||||||
T& shadow() { return m_shadow; }
|
T& shadow() { return m_shadow; }
|
||||||
|
@ -162,10 +162,11 @@ inline ValueWithShadow<T>::ValueWithShadow(const ValueAndShadowReference<T>& oth
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline void ValueAndShadowReference<T>::operator=(const ValueWithShadow<T>& other)
|
inline ValueAndShadowReference<T>& ValueAndShadowReference<T>::operator=(const ValueWithShadow<T>& other)
|
||||||
{
|
{
|
||||||
m_value = other.value();
|
m_value = other.value();
|
||||||
m_shadow = other.shadow();
|
m_shadow = other.shadow();
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue