Commit a7ec88c2 authored by Robert Knight's avatar Robert Knight
Browse files

Re-write CharacterColor::operator==(), CharacterColor::operator!=().

Previous implementation caused memory alignment trap on ARM.

BUG:160137

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=792018
parent bd154850
......@@ -244,14 +244,11 @@ private:
inline bool operator == (const CharacterColor& a, const CharacterColor& b)
{
return *reinterpret_cast<const quint32*>(&a._colorSpace) ==
*reinterpret_cast<const quint32*>(&b._colorSpace);
return !memcmp(&a,&b,sizeof(CharacterColor));
}
inline bool operator != (const CharacterColor& a, const CharacterColor& b)
{
return *reinterpret_cast<const quint32*>(&a._colorSpace) !=
*reinterpret_cast<const quint32*>(&b._colorSpace);
return !operator==(a,b);
}
inline const QColor color256(quint8 u, const ColorEntry* base)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment