summaryrefslogtreecommitdiff
path: root/src/base/bitunion.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-07-17 13:23:42 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-07-17 13:23:42 -0700
commit13ccac1a3cb7bb33b7a6d2c65f875d1a40a6e352 (patch)
treec061ad1808c9d9923d4c0409d06d815d3e31680c /src/base/bitunion.hh
parent873b762d4b7ced232782c937e6927d1f007e82eb (diff)
downloadgem5-13ccac1a3cb7bb33b7a6d2c65f875d1a40a6e352.tar.xz
Add a conversion constructor so a bitunion can be initialized to a value.
Previously, the bitunion would need to be declared and then assigned to separately. --HG-- extra : convert_revision : d229bd83bc7baeca2259d4e7b080f359915015f3
Diffstat (limited to 'src/base/bitunion.hh')
-rw-r--r--src/base/bitunion.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index 55553fd9c..98861e779 100644
--- a/src/base/bitunion.hh
+++ b/src/base/bitunion.hh
@@ -193,6 +193,13 @@ namespace BitfieldBackend
class BitUnionOperators : public Base
{
public:
+ BitUnionOperators(Type & _data)
+ {
+ Base::__data = _data;
+ }
+
+ BitUnionOperators() {}
+
operator Type () const
{
return Base::__data;