Fixes -Wrange-loop-construct, -Wmismatched-tags, and -Wshadow.
const ipcache_addrs *ia = ipcache_gethostbyname(checklist->request->url.host(), IP_LOOKUP_IF_MISS);
if (ia) {
- for (const auto ip: ia->goodAndBad()) {
+ for (const auto &ip: ia->goodAndBad()) {
if (data->match(ip))
return 1;
}
if (ia) {
/* Entry in cache found */
- for (const auto ip: ia->goodAndBad()) {
+ for (const auto &ip: ia->goodAndBad()) {
if (ACLIP::match(ip))
return 1;
}
}
bool
-Rock::Rebuild::Stats::completed(const SwapDir &sd) const
+Rock::Rebuild::Stats::completed(const SwapDir &dir) const
{
- return DoneLoading(counts.scancount, sd.slotLimitActual()) &&
- DoneValidating(counts.validations, sd.slotLimitActual(), sd.entryLimitActual());
+ return DoneLoading(counts.scancount, dir.slotLimitActual()) &&
+ DoneValidating(counts.validations, dir.slotLimitActual(), dir.entryLimitActual());
}
/* Rebuild */
bool
-Rock::Rebuild::IsResponsible(const SwapDir &sd)
+Rock::Rebuild::IsResponsible(const SwapDir &dir)
{
// in SMP mode, only the disker is responsible for populating the map
return !UsingSmp() || IamDiskProcess();
* Please see the COPYING and CONTRIBUTORS files for details.
*/
#line 24 "RegisteredHeadersHash.gperf"
-struct HeaderTableRecord;
- enum
+class HeaderTableRecord;
+ enum
{
TOTAL_KEYWORDS = 88,
MIN_WORD_LENGTH = 2,
private:
static inline unsigned int HttpHeaderHash (const char *str, size_t len);
public:
- static const struct HeaderTableRecord *lookup (const char *str, size_t len);
+ static const class HeaderTableRecord *lookup (const char *str, size_t len);
};
inline unsigned int
19, 0, 0, 0, 18, 14, 0, 0, 13, 13, 0, 13
};
-static const struct HeaderTableRecord HttpHeaderDefinitionsTable[] =
+static const class HeaderTableRecord HttpHeaderDefinitionsTable[] =
{
{""}, {""}, {""}, {""}, {""},
#line 67 "RegisteredHeadersHash.gperf"
{"Last-Modified", Http::HdrType::LAST_MODIFIED, Http::HdrFieldType::ftDate_1123, HdrKind::EntityHeader}
};
-const struct HeaderTableRecord *
+const class HeaderTableRecord *
HttpHeaderHashTable::lookup (const char *str, size_t len)
{
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
%global-table
%ignore-case
%struct-type
-struct HeaderTableRecord;
+class HeaderTableRecord;
%%
Accept, Http::HdrType::ACCEPT, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader
Accept-Charset, Http::HdrType::ACCEPT_CHARSET, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader
return;
}
- for (const auto ip: ia->goodAndBad()) { // TODO: Consider using just good().
+ for (const auto &ip: ia->goodAndBad()) { // TODO: Consider using just good().
debugs(7, 9, "Listening for ICP requests on " << ip);
if (!ip.isIPv4()) {