Commit 0536e386 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Remove a static destructor in NeuralStylusPalmDetectionFilter.

Use a raw array instead of a std::vector for a constant, so it can be
constexpr and no longer has a static destructor.

Change-Id: I05fac4e8ce88cdebd63cebc5a9e25ee99ada1082
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429611Reviewed-by: default avatarMichael Spang <spang@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810477}
parent d74e405b
...@@ -423,10 +423,10 @@ bool NeuralStylusPalmDetectionFilter:: ...@@ -423,10 +423,10 @@ bool NeuralStylusPalmDetectionFilter::
return true; return true;
}; };
static const std::vector<int> kRequiredAbsMtCodes = { static constexpr int kRequiredAbsMtCodes[] = {
ABS_MT_POSITION_X, ABS_MT_POSITION_Y, ABS_MT_TOUCH_MAJOR}; ABS_MT_POSITION_X, ABS_MT_POSITION_Y, ABS_MT_TOUCH_MAJOR};
if (!std::all_of(kRequiredAbsMtCodes.begin(), kRequiredAbsMtCodes.end(), if (!std::all_of(std::begin(kRequiredAbsMtCodes),
code_check)) { std::end(kRequiredAbsMtCodes), code_check)) {
return false; return false;
} }
......
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