Bug 1444472 - fix incorrect clang warning in nsCORSListenerProxy; r=valentin

Older versions of clang complain about this code, with:

netwerk/protocol/http/nsCORSListenerProxy.cpp:230:5: error: default initialization of an object of const type 'const struct CheckHeaderToken' without a user-provided default constructor

Later versions of the standard were amended to make this not an error,
but clang still warns.  Pacify clang by making the object not const.
This commit is contained in:
Nathan Froyd 2018-03-12 16:46:33 -04:00
parent 82986c8859
commit edc7498b90

View File

@ -221,7 +221,7 @@ nsPreflightCache::CacheEntry::CheckRequest(const nsCString& aMethod,
}
}
const struct CheckHeaderToken {
struct CheckHeaderToken {
bool Equals(const TokenTime& e, const nsCString& header) const {
return e.token.Equals(header, comparator);
}