From ad07f2838b1b4b87c84f04ee67e0a28677a734ba Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 22 Feb 2013 16:34:37 -0800 Subject: [PATCH] nodestack: don't use C++ references Just pass-by-value, since the reference can obfuscate the lifetime of, for example, an automatic variable. --- nodestack.cc | 2 +- nodestack.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nodestack.cc b/nodestack.cc index b2ef73ca..59e9b5dc 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -226,7 +226,7 @@ bool Node::misc_empty() const * @param value is the value to backtrack to. * @return True if the future value was successully added; false otherwise */ -bool Node::add_future_value(struct future_value& fv) +bool Node::add_future_value(struct future_value fv) { uint64_t value = fv.value; modelclock_t expiration = fv.expiration; diff --git a/nodestack.h b/nodestack.h index 47c72678..cd34ba42 100644 --- a/nodestack.h +++ b/nodestack.h @@ -71,7 +71,7 @@ public: * occurred previously in the stack. */ Node * get_parent() const { return parent; } - bool add_future_value(struct future_value& fv); + bool add_future_value(struct future_value fv); struct future_value get_future_value() const; bool increment_future_value(); bool future_value_empty() const; -- 2.34.1