From: Gabe Black Date: Sun, 21 Jun 2009 23:40:33 +0000 (-0700) Subject: BitUnion: Add more constiness. X-Git-Tag: Calvin_Submission~268 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1657a890e49c1bcfb025258474b6c44725ee7c9;p=gem5.git BitUnion: Add more constiness. --- diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh index c61d1cc7c..f640fa3b1 100644 --- a/src/base/bitunion.hh +++ b/src/base/bitunion.hh @@ -86,7 +86,7 @@ namespace BitfieldBackend class Bitfield : public BitfieldBase { public: - operator uint64_t () const + operator const uint64_t () const { return this->getBits(first, last); } @@ -117,7 +117,7 @@ namespace BitfieldBackend class BitfieldWO : public Bitfield { private: - operator uint64_t () const; + operator const uint64_t () const; public: using Bitfield::operator=; @@ -136,7 +136,7 @@ namespace BitfieldBackend class SignedBitfield : public BitfieldBase { public: - operator int64_t () const + operator const int64_t () const { return sext(this->getBits(first, last)); } @@ -167,7 +167,7 @@ namespace BitfieldBackend class SignedBitfieldWO : public SignedBitfield { private: - operator int64_t () const; + operator const int64_t () const; public: int64_t operator=(const int64_t _data) @@ -200,7 +200,7 @@ namespace BitfieldBackend BitUnionOperators() {} - operator Type () const + operator const Type () const { return Base::__data; } @@ -280,7 +280,7 @@ namespace BitfieldBackend //do so. #define EndSubBitUnion(name) \ }; \ - inline operator const __DataType () \ + inline operator const __DataType () const \ { return __data; } \ \ inline const __DataType operator = (const __DataType & _data) \