diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-10-02 16:28:49 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-03 12:35:58 +0000 |
commit | 862c19675edb26ed7cba56ae6ca9f98c1e4cbef1 (patch) | |
tree | 446fecbce607a64102f08b43fdd6975e5052efdc /src/codec/SkBmpCodec.cpp | |
parent | dd7ffa5a557bcaa1daebd0f056a8f1bafb992d4d (diff) |
Remove static initializers in SkCodec
Bug: 768878
Switch const declarations to constexpr where appropriate. Speculative
fix for crbug.com/768878.
Change-Id: I7fc356e623ce7a0f2b87e92e9a8ed95d5c423d79
Reviewed-on: https://skia-review.googlesource.com/54101
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Diffstat (limited to 'src/codec/SkBmpCodec.cpp')
-rw-r--r-- | src/codec/SkBmpCodec.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp index 60785ba35f..d97dff0971 100644 --- a/src/codec/SkBmpCodec.cpp +++ b/src/codec/SkBmpCodec.cpp @@ -81,17 +81,17 @@ std::unique_ptr<SkCodec> SkBmpCodec::MakeFromIco(std::unique_ptr<SkStream> strea } // Header size constants -static const uint32_t kBmpHeaderBytes = 14; -static const uint32_t kBmpHeaderBytesPlusFour = kBmpHeaderBytes + 4; -static const uint32_t kBmpOS2V1Bytes = 12; -static const uint32_t kBmpOS2V2Bytes = 64; -static const uint32_t kBmpInfoBaseBytes = 16; -static const uint32_t kBmpInfoV1Bytes = 40; -static const uint32_t kBmpInfoV2Bytes = 52; -static const uint32_t kBmpInfoV3Bytes = 56; -static const uint32_t kBmpInfoV4Bytes = 108; -static const uint32_t kBmpInfoV5Bytes = 124; -static const uint32_t kBmpMaskBytes = 12; +static constexpr uint32_t kBmpHeaderBytes = 14; +static constexpr uint32_t kBmpHeaderBytesPlusFour = kBmpHeaderBytes + 4; +static constexpr uint32_t kBmpOS2V1Bytes = 12; +static constexpr uint32_t kBmpOS2V2Bytes = 64; +static constexpr uint32_t kBmpInfoBaseBytes = 16; +static constexpr uint32_t kBmpInfoV1Bytes = 40; +static constexpr uint32_t kBmpInfoV2Bytes = 52; +static constexpr uint32_t kBmpInfoV3Bytes = 56; +static constexpr uint32_t kBmpInfoV4Bytes = 108; +static constexpr uint32_t kBmpInfoV5Bytes = 124; +static constexpr uint32_t kBmpMaskBytes = 12; static BmpHeaderType get_header_type(size_t infoBytes) { if (infoBytes >= kBmpInfoBaseBytes) { |