summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2010-03-25 19:35:53 -0700
committerJosh Stone <jistone@redhat.com>2010-03-25 19:35:53 -0700
commitfc80eab8cc1cbebad78df914a885cb74cbd91f22 (patch)
treed8f868bf833f914bc3caf0445921692c05b613f9
parent9ea68eb97aaf04104b18d5650a6321a4c7d3ad8d (diff)
downloadsystemtap-steved-fc80eab8cc1cbebad78df914a885cb74cbd91f22.tar.gz
systemtap-steved-fc80eab8cc1cbebad78df914a885cb74cbd91f22.tar.xz
systemtap-steved-fc80eab8cc1cbebad78df914a885cb74cbd91f22.zip
Remove probe_point code duplication
* staptree.cxx (probe_point::str): Don't duplicate ::print -- reuse it.
-rw-r--r--staptree.cxx15
1 files changed, 1 insertions, 14 deletions
diff --git a/staptree.cxx b/staptree.cxx
index 643f61b3..bb8b6249 100644
--- a/staptree.cxx
+++ b/staptree.cxx
@@ -1091,20 +1091,7 @@ void probe_point::print (ostream& o) const
string probe_point::str ()
{
ostringstream o;
- for (unsigned i=0; i<components.size(); i++)
- {
- if (i>0) o << ".";
- probe_point::component* c = components[i];
- o << c->functor;
- if (c->arg)
- o << "(" << *c->arg << ")";
- }
- if (sufficient)
- o << "!";
- else if (optional) // sufficient implies optional
- o << "?";
- if (condition)
- o<< " if (" << *condition << ")";
+ print(o);
return o.str();
}