summaryrefslogtreecommitdiffstats
path: root/staptree.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-08-26 17:35:54 -0700
committerJosh Stone <jistone@redhat.com>2009-08-26 17:41:34 -0700
commit546499713651809f026e118f81b9c52f01c895f6 (patch)
tree6ab0d7f6c03f69e5aac93be21ad7e9050412f0fa /staptree.cxx
parent8a9a609f15c3088bcaaf9728393662372f91ab62 (diff)
downloadsystemtap-steved-546499713651809f026e118f81b9c52f01c895f6.tar.gz
systemtap-steved-546499713651809f026e118f81b9c52f01c895f6.tar.xz
systemtap-steved-546499713651809f026e118f81b9c52f01c895f6.zip
Remove unnecessary static members
When a static class member is only used by a single method, it's more concise to use a static local variable instead. * staptree.cxx (probe::probe): Make last_probeidx a static local. * tapset-perfmon.cxx (perfmon_derived_probe::perfmon_derived_probe): Make probes_allocated a static local.
Diffstat (limited to 'staptree.cxx')
-rw-r--r--staptree.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/staptree.cxx b/staptree.cxx
index aa37b754..b4975017 100644
--- a/staptree.cxx
+++ b/staptree.cxx
@@ -97,10 +97,10 @@ probe_point::probe_point ():
}
-unsigned probe::last_probeidx = 0;
probe::probe ():
body (0), tok (0)
{
+ static unsigned last_probeidx = 0;
this->name = string ("probe_") + lex_cast<string>(last_probeidx ++);
}