QH2Connection: store the BitPatterns as constexpr
Unlike Clang, GCC does not automatically emit them as constexpr with just "const" declaration. $ nm -C lib64/libQt6Network.so.6.9.0 | grep -F 'HPack::(' 00000000001dc376 r HPack::(anonymous namespace)::LiteralNoIndexing 00000000001dc374 r HPack::(anonymous namespace)::LiteralNeverIndexing 00000000001dc480 r HPack::(anonymous namespace)::staticHuffmanCodeTable 00000000001dc378 r HPack::(anonymous namespace)::LiteralIncrementalIndexing 00000000001dc37a r HPack::(anonymous namespace)::Indexed Pick-to: 6.7 6.5 Change-Id: I398f9e3d83d44f198a69fffd17e26e30b9bce7ed Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit c607a3894c39a2c5a35e9d474b233637a6f55cc7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9f0c48c6b1
commit
c778f11eef
@ -54,11 +54,11 @@ using StreamError = BitIStream::Error;
|
|||||||
|
|
||||||
// It's always 1 or 0 actually, but the number of bits to extract
|
// It's always 1 or 0 actually, but the number of bits to extract
|
||||||
// from the input stream - differs.
|
// from the input stream - differs.
|
||||||
const BitPattern Indexed = {1, 1};
|
constexpr BitPattern Indexed = {1, 1};
|
||||||
const BitPattern LiteralIncrementalIndexing = {1, 2};
|
constexpr BitPattern LiteralIncrementalIndexing = {1, 2};
|
||||||
const BitPattern LiteralNoIndexing = {0, 4};
|
constexpr BitPattern LiteralNoIndexing = {0, 4};
|
||||||
const BitPattern LiteralNeverIndexing = {1, 4};
|
constexpr BitPattern LiteralNeverIndexing = {1, 4};
|
||||||
const BitPattern SizeUpdate = {1, 3};
|
constexpr BitPattern SizeUpdate = {1, 3};
|
||||||
|
|
||||||
bool is_literal_field(BitPattern pattern)
|
bool is_literal_field(BitPattern pattern)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user