/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
}
bool
-ACLStringData::match(char const *toFind)
+ACLStringData::match(const SBuf &tf)
{
- if (stringValues.empty() || !toFind)
+ if (stringValues.empty() || tf.isEmpty())
return 0;
- SBuf tf(toFind);
debugs(28, 3, "aclMatchStringList: checking '" << tf << "'");
bool found = (stringValues.find(tf) != stringValues.end());
return found;
}
+// XXX: performance regression due to SBuf(char*) data-copies.
+bool
+ACLStringData::match(char const *toFind)
+{
+ return match(SBuf(toFind));
+}
+
SBufList
ACLStringData::dump() const
{