/*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
#include "acl/Checklist.h"
#include "acl/DomainData.h"
#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
#include "src/URL.h"
#include "util.h"
ACLDomainData::~ACLDomainData()
{
- if (domains)
+ if (domains) {
domains->destroy(xRefFree);
+ delete domains;
+ }
}
template<class T>
void
ACLDomainData::parse()
{
- char *t = NULL;
-
if (!domains)
domains = new Splay<char *>();
- while ((t = strtokFile())) {
+ while (char *t = ConfigParser::strtokFile()) {
Tolower(t);
domains->insert(xstrdup(t), aclDomainCompare);
}