projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c0182a1
)
action: use constructor initializer list
author
Brian Norris
<banorris@uci.edu>
Sat, 7 Jul 2012 00:21:33 +0000
(17:21 -0700)
committer
Brian Norris
<banorris@uci.edu>
Sat, 7 Jul 2012 00:32:48 +0000
(17:32 -0700)
action.cc
patch
|
blob
|
history
diff --git
a/action.cc
b/action.cc
index d5131f0b03dfc9c7c9b86c901ca4215fbfac8245..f41b0eba7643e18a912b776c71470eddf71a1bf7 100644
(file)
--- a/
action.cc
+++ b/
action.cc
@@
-5,19
+5,16
@@
#include "clockvector.h"
#include "common.h"
#include "clockvector.h"
#include "common.h"
-ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, int value)
+ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, int value) :
+ type(type),
+ order(order),
+ location(loc),
+ value(value),
+ cv(NULL)
{
Thread *t = thread_current();
{
Thread *t = thread_current();
- ModelAction *act = this;
-
- act->type = type;
- act->order = order;
- act->location = loc;
- act->tid = t->get_id();
- act->value = value;
- act->seq_number = model->get_next_seq_num();
-
- cv = NULL;
+ this->tid = t->get_id();
+ this->seq_number = model->get_next_seq_num();
}
ModelAction::~ModelAction()
}
ModelAction::~ModelAction()