summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-06-21 16:40:33 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-06-21 16:40:33 -0700
commitf1657a890e49c1bcfb025258474b6c44725ee7c9 (patch)
tree2cd3700ab33369bb90b87740c3cce530c576bc21 /src/base
parent7e4f132369193f3a8a8f05ecf1f5a531c762288a (diff)
downloadgem5-f1657a890e49c1bcfb025258474b6c44725ee7c9.tar.xz
BitUnion: Add more constiness.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/bitunion.hh12
1 files changed, 6 insertions, 6 deletions
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<Type>
{
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<first, last>
{
private:
- operator uint64_t () const;
+ operator const uint64_t () const;
public:
using Bitfield<first, last>::operator=;
@@ -136,7 +136,7 @@ namespace BitfieldBackend
class SignedBitfield : public BitfieldBase<Type>
{
public:
- operator int64_t () const
+ operator const int64_t () const
{
return sext<first - last + 1>(this->getBits(first, last));
}
@@ -167,7 +167,7 @@ namespace BitfieldBackend
class SignedBitfieldWO : public SignedBitfield<first, last>
{
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) \