From: Brian Norris Date: Thu, 19 Apr 2012 20:00:26 +0000 (-0700) Subject: model: create 'action_list_t' typedef X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d559cca6ce8264cee284dda4e0962b3bb564c955;p=c11tester.git model: create 'action_list_t' typedef 'std::list' is a long name for a repeated type. Replace it. --- diff --git a/model.cc b/model.cc index adc47cd0..e496abd0 100644 --- a/model.cc +++ b/model.cc @@ -17,7 +17,7 @@ ModelChecker::ModelChecker() rootNode = new TreeNode(NULL); currentNode = rootNode; - action_trace = new std::list(); + action_trace = new action_list_t(); } ModelChecker::~ModelChecker() @@ -53,7 +53,7 @@ ModelAction *ModelChecker::get_last_conflict(ModelAction *act) default: break; } - std::list::reverse_iterator rit; + action_list_t::reverse_iterator rit; for (rit = action_trace->rbegin(); rit != action_trace->rend(); rit++) { ModelAction *prev = *rit; if (prev->get_location() != loc) @@ -112,7 +112,7 @@ void ModelChecker::check_current_action(void) void ModelChecker::print_trace(void) { - std::list::iterator it; + action_list_t::iterator it; printf("\n"); printf("---------------------------------------------------------------------\n"); diff --git a/model.h b/model.h index b62ab80a..a347350a 100644 --- a/model.h +++ b/model.h @@ -20,6 +20,8 @@ typedef enum action_type { ATOMIC_WRITE } action_type_t; +typedef std::list action_list_t; + class ModelAction { public: ModelAction(action_type_t type, memory_order order, void *loc, int value); @@ -65,7 +67,7 @@ public: private: int used_thread_id; class ModelAction *current_action; - std::list *action_trace; + action_list_t *action_trace; std::map thread_map; class TreeNode *rootNode, *currentNode; };