diff options
author | Josh Stone <jistone@redhat.com> | 2010-03-25 19:35:53 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2010-03-25 19:35:53 -0700 |
commit | fc80eab8cc1cbebad78df914a885cb74cbd91f22 (patch) | |
tree | d8f868bf833f914bc3caf0445921692c05b613f9 | |
parent | 9ea68eb97aaf04104b18d5650a6321a4c7d3ad8d (diff) | |
download | systemtap-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.cxx | 15 |
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(); } |