diff options
author | Dave Brolley <brolley@redhat.com> | 2009-09-14 17:47:26 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-09-14 17:47:26 -0400 |
commit | 9df741675d7e36008869dfff46ccc602875dc091 (patch) | |
tree | 1deafeacb302f9154586708ada7a240470aa6b4a /util.h | |
parent | b232fab3a271c4c787462295d7ffbeca750c1092 (diff) | |
parent | 775c3771bb4a5f663a763d7c65b1571e24e4b212 (diff) | |
download | systemtap-steved-9df741675d7e36008869dfff46ccc602875dc091.tar.gz systemtap-steved-9df741675d7e36008869dfff46ccc602875dc091.tar.xz systemtap-steved-9df741675d7e36008869dfff46ccc602875dc091.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts:
aclocal.m4
configure
doc/SystemTap_Tapset_Reference/Makefile.in
testsuite/aclocal.m4
testsuite/configure
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -97,4 +97,16 @@ lex_cast_qstring(std::string const & in) return out; } + +// Delete all values from a map-like container and clear it +// (The template is permissive -- be good!) +template <typename T> +void delete_map(T& t) +{ + for (typename T::iterator i = t.begin(); i != t.end(); ++i) + delete i->second; + t.clear(); +} + + /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ |