提交 81408cd5 编写于 作者: B Behdad Esfahbod

Don't use "operator ="

Some compilers don't like operator = defined on members of union members
either.  Reported by Ginn Chen for Sun Studio compilers.
上级 39fe34d4
......@@ -370,7 +370,7 @@ template <typename Type>
class BEInt<Type, 2>
{
public:
inline class BEInt<Type,2>& operator = (Type i) { hb_be_uint16_put (v,i); return *this; }
inline void set (Type i) { hb_be_uint16_put (v,i); }
inline operator Type () const { return hb_be_uint16_get (v); }
inline bool operator == (const BEInt<Type, 2>& o) const { return hb_be_uint16_cmp (v, o.v); }
inline bool operator != (const BEInt<Type, 2>& o) const { return !(*this == o); }
......@@ -380,7 +380,7 @@ template <typename Type>
class BEInt<Type, 4>
{
public:
inline class BEInt<Type,4>& operator = (Type i) { hb_be_uint32_put (v,i); return *this; }
inline void set (Type i) { hb_be_uint32_put (v,i); }
inline operator Type () const { return hb_be_uint32_get (v); }
inline bool operator == (const BEInt<Type, 4>& o) const { return hb_be_uint32_cmp (v, o.v); }
inline bool operator != (const BEInt<Type, 4>& o) const { return !(*this == o); }
......@@ -391,7 +391,7 @@ class BEInt<Type, 4>
template <typename Type>
struct IntType
{
inline void set (Type i) { v = i; }
inline void set (Type i) { v.set (i); }
inline operator Type(void) const { return v; }
inline bool operator == (const IntType<Type> &o) const { return v == o.v; }
inline bool operator != (const IntType<Type> &o) const { return v != o.v; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册