Commit 50f12de0 authored by Shelley Vohr's avatar Shelley Vohr Committed by Commit Bot

Make std::hash enum values non-const.

MSVC fails when these hash values are const as seen with the following
on Windows: `error: call to implicitly-deleted default constructor of
'std::hash<const input_prediction::PredictorType>'`. This can be seen
I don't see a clear reason for them to be const, and have thus removed
them in this CL in order to fix the build on MSVC.

here: https://ci.appveyor.com/project/electron-bot/electron-ia32-testing/builds/26830974.
Change-Id: I978cd122554a30715a54bc3e0609f5724539bae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762335Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689468}
parent b9ee0979
......@@ -40,8 +40,8 @@ struct FilterParamMapKey {
// in a hashmap
struct FilterParamMapKeyHash {
std::size_t operator()(const FilterParamMapKey& k) const {
return std::hash<const input_prediction::FilterType>{}(k.filter_type) ^
std::hash<const input_prediction::PredictorType>{}(k.predictor_type);
return std::hash<input_prediction::FilterType>{}(k.filter_type) ^
std::hash<input_prediction::PredictorType>{}(k.predictor_type);
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment