From 47129ff6e38cd62e7a14193810a22c5fc2c70124 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Tue, 31 Jul 2012 15:41:35 -0700 Subject: [PATCH] nodestack: document pop_restofstack() --- nodestack.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nodestack.cc b/nodestack.cc index 5a658211..1de51693 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -220,7 +220,13 @@ ModelAction * NodeStack::explore_action(ModelAction *act) return NULL; } - +/** + * Empties the stack of all trailing nodes after a given position and calls the + * destructor for each. This function is provided an offset which determines + * how many nodes (relative to the current replay state) to save before popping + * the stack. + * @param numAhead The number of nodes to skip forward before popping the stack. + */ void NodeStack::pop_restofstack(int numAhead) { /* Diverging from previous execution; clear out remainder of list */ @@ -230,7 +236,6 @@ void NodeStack::pop_restofstack(int numAhead) clear_node_list(&node_list, it, node_list.end()); } - Node * NodeStack::get_head() { if (node_list.empty()) -- 2.34.1