Skip to content
This repository has been archived by the owner. It is now read-only.

Fix variable shadow issue #210

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fix variable shadow issue

Fix for declaration shadows a field of 'Filter', previous declaration in filter.h:204
  • Loading branch information
ali-idrizi committed Apr 30, 2019
commit 1286e61808950aa6c483e616fe796b47b4b24c73
@@ -156,9 +156,9 @@ friend class AdBlockClient;
}
*/

int hostLen = 0;
int hostLen_ = 0;
if (host) {
hostLen = this->hostLen == -1 ?
hostLen_ = this->hostLen == -1 ?
static_cast<int>(strlen(host)) : this->hostLen;
}
int rhsHostLen = 0;
@@ -167,11 +167,11 @@ friend class AdBlockClient;
static_cast<int>(strlen(rhs.host)) : rhs.hostLen;
}

if (hostLen != rhsHostLen) {
if (hostLen_ != rhsHostLen) {
return false;
}

return !memcmp(host, rhs.host, hostLen);
return !memcmp(host, rhs.host, hostLen_);
}

bool operator!=(const Filter &rhs) const {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.