Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: net/http2/hpack/decoder/hpack_decoder_tables.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http2/hpack/decoder/hpack_decoder_tables.h" 5 #include "net/http2/hpack/decoder/hpack_decoder_tables.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace net { 9 namespace net {
10 namespace { 10 namespace {
11 11
12 std::vector<HpackStringPair>* MakeStaticTable() { 12 std::vector<HpackStringPair>* MakeStaticTable() {
13 auto ptr = new std::vector<HpackStringPair>(); 13 auto* ptr = new std::vector<HpackStringPair>();
14 ptr->reserve(kFirstDynamicTableIndex); 14 ptr->reserve(kFirstDynamicTableIndex);
15 ptr->emplace_back("", ""); 15 ptr->emplace_back("", "");
16 16
17 #define STATIC_TABLE_ENTRY(name, value, index) \ 17 #define STATIC_TABLE_ENTRY(name, value, index) \
18 DCHECK_EQ(ptr->size(), index); \ 18 DCHECK_EQ(ptr->size(), index); \
19 ptr->emplace_back(name, value) 19 ptr->emplace_back(name, value)
20 20
21 #include "net/http2/hpack/hpack_static_table_entries.inc" 21 #include "net/http2/hpack/hpack_static_table_entries.inc"
22 22
23 #undef STATIC_TABLE_ENTRY 23 #undef STATIC_TABLE_ENTRY
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 const HpackStringPair* HpackDecoderTables::Lookup(size_t index) const { 144 const HpackStringPair* HpackDecoderTables::Lookup(size_t index) const {
145 if (index < kFirstDynamicTableIndex) { 145 if (index < kFirstDynamicTableIndex) {
146 return static_table_.Lookup(index); 146 return static_table_.Lookup(index);
147 } else { 147 } else {
148 return dynamic_table_.Lookup(index - kFirstDynamicTableIndex); 148 return dynamic_table_.Lookup(index - kFirstDynamicTableIndex);
149 } 149 }
150 } 150 }
151 151
152 } // namespace net 152 } // namespace net
OLDNEW
« no previous file with comments | « net/http2/decoder/payload_decoders/ping_payload_decoder.cc ('k') | net/http2/hpack/huffman/http2_hpack_huffman_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698