Move const double data out of header file
When non-integral const data is defined in a header file it often ends
up being instantiated in multiple translation units. It also ends up in
the read/write data segment which means it isn't shared between
processes. This change has the following affect on the size of sections
in a 32-bit release Windows build:
chrome.dll
.text: -704 bytes change
.rdata: 80 bytes change
.data: -128 bytes change
.reloc: 204 bytes change
Total change: -548 bytes
Note that the sections that increase in size are either shareable
(.rdata) or discardable (.reloc).
The technique of using static constexpr in a struct is the only way to
guarantee both zero duplication of data and no run-time construction
of data (until C++17 and inline variables).
BUG=630755
Review-Url: https://codereview.chromium.org/2509403002
Cr-Commit-Position: refs/heads/master@{#433015}
3 files changed