X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fformatter.cc;h=01c57609554ecc52d2f9ab036c7baf9cb6a770d0;hb=59eb699744f35218cbf8e6d5b2d831c81575452d;hp=e0a347a05e862607dad7086cee6cb99f27b07105;hpb=8faa9f0a402b20abd1919307d0bd80088964435f;p=awesomized%2Flibmemcached diff --git a/libtest/formatter.cc b/libtest/formatter.cc index e0a347a0..01c57609 100644 --- a/libtest/formatter.cc +++ b/libtest/formatter.cc @@ -34,12 +34,13 @@ * */ -#include "mem_config.h" +#include "libtest/yatlcon.h" #include -#include +#include #include +#include namespace libtest { @@ -97,10 +98,8 @@ Formatter::Formatter(const std::string& frame_name, const std::string& arg) Formatter::~Formatter() { - for (TestCases::iterator iter= _testcases.begin(); iter != _testcases.end(); ++iter) - { - delete *iter; - } + std::for_each(_testcases.begin(), _testcases.end(), DeleteFromVector()); + _testcases.clear(); } TestCase* Formatter::current()