projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
873b762
)
Add a conversion constructor so a bitunion can be initialized to a value.
author
Gabe Black
<gblack@eecs.umich.edu>
Tue, 17 Jul 2007 20:23:42 +0000
(13:23 -0700)
committer
Gabe Black
<gblack@eecs.umich.edu>
Tue, 17 Jul 2007 20:23:42 +0000
(13:23 -0700)
Previously, the bitunion would need to be declared and then assigned to separately.
--HG--
extra : convert_revision :
d229bd83bc7baeca2259d4e7b080f359915015f3
src/base/bitunion.hh
patch
|
blob
|
history
diff --git
a/src/base/bitunion.hh
b/src/base/bitunion.hh
index 55553fd9c7dab1157014b502ab78ba28a44d1e97..98861e779073cbd3de5b45b0d0f988d7725eef34 100644
(file)
--- 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;