DescriptionChromium doesn't compile with -Wglobal-constructors
We compile chromium with clang flag -Wglobal-constructors in our
project. We have following compilation error during compilation
of user_input_tracker.cc:
../../chrome/browser/page_load_metrics/user_input_tracker.cc:27:11:
error: declaration requires a global constructor [-Werror,-Wglobal-constructors]
const int kRateLimitClampMillis = (kOldestAllowedEventAgeSeconds * 1000) /
In order to get rid of this global constructor I recommend to declare
static class variable UserInputTracker::kMaxTrackedEvents and global
variable kRateLimitClampMillis as constexpr which will be expanded to
numerical value during compilation.
BUG=686669
Review-Url: https://codereview.chromium.org/2662803002
Cr-Commit-Position: refs/heads/master@{#447000}
Committed: https://chromium.googlesource.com/chromium/src/+/656950c2f6ebeae22139d9753eca81f213c74b53
Patch Set 1 #
Total comments: 2
Patch Set 2 : Change for request from review. #
Messages
Total messages: 12 (7 generated)
|