1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:37:47 +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:
Hendiadyoin1 2021-12-22 16:33:10 +01:00 committed by Brian Gianforcaro
parent c0d6afdc67
commit 584ba7da13

View file

@ -100,7 +100,7 @@ public:
return (m_shadow & 0x01) != 0x01;
}
void operator=(const ValueWithShadow<T>&);
ValueAndShadowReference<T>& operator=(const ValueWithShadow<T>&);
T& value() { return m_value; }
T& shadow() { return m_shadow; }
@ -162,10 +162,11 @@ inline ValueWithShadow<T>::ValueWithShadow(const ValueAndShadowReference<T>& oth
}
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_shadow = other.shadow();
return *this;
}
}