From 8b095b454b34e88c04592be6c651153f802eced6 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 3 Aug 2009 15:49:40 -0700 Subject: Add update_visitor::replace I noticed that most uses of update_visitor::require() were simply writing the value back to the same place, i.e. foo = require(foo). The new replace() method just encapsulates that paradigm, so we don't have the duplication between the LHS and RHS. * staptree.h (update_visitor::replace): New. * elaborate.cxx, staptree.cxx, tapset-mark.cxx, tapset-perfmon.cxx, tapset-procfs.cxx, tapset-utrace.cxx, tapsets.cxx: Update all require calls that are simply updating the value in-place. --- tapset-mark.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tapset-mark.cxx') diff --git a/tapset-mark.cxx b/tapset-mark.cxx index 59334729..6b4f47c5 100644 --- a/tapset-mark.cxx +++ b/tapset-mark.cxx @@ -223,7 +223,7 @@ mark_derived_probe::mark_derived_probe (systemtap_session &s, // Now expand the local variables in the probe body mark_var_expanding_visitor v (sess, name, mark_args); - this->body = v.require (this->body); + v.replace (this->body); target_symbol_seen = v.target_symbol_seen; if (sess.verbose > 2) -- cgit