#include "base/cprintf.hh"
#include "base/logging.hh"
-using namespace std;
-
namespace Debug {
//
Flag::Flag(const char *name, const char *desc)
: _name(name), _desc(desc)
{
- pair<FlagsMap::iterator, bool> result =
- allFlags().insert(make_pair(name, this));
+ std::pair<FlagsMap::iterator, bool> result =
+ allFlags().insert(std::make_pair(name, this));
if (!result.second)
panic("Flag %s already defined!", name);
Flag::~Flag()
{
- // should find and remove flag.
+ allFlags().erase(name());
}
void