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

Side by Side Diff: core/fxcrt/fx_basic_plex.cpp

Issue 2612773007: Remove CFX_MapPtrToPtr and templates. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « core/fxcrt/fx_basic_maps.cpp ('k') | core/fxcrt/plex.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "core/fxcrt/fx_memory.h"
8 #include "core/fxcrt/plex.h"
9
10 CFX_Plex* CFX_Plex::Create(CFX_Plex*& pHead,
11 uint32_t nMax,
12 uint32_t cbElement) {
13 CFX_Plex* p =
14 (CFX_Plex*)FX_Alloc(uint8_t, sizeof(CFX_Plex) + nMax * cbElement);
15 p->pNext = pHead;
16 pHead = p;
17 return p;
18 }
19 void CFX_Plex::FreeDataChain() {
20 CFX_Plex* p = this;
21 while (p) {
22 CFX_Plex* old = p;
23 p = p->pNext;
24 FX_Free(old);
25 }
26 }
OLDNEW
« no previous file with comments | « core/fxcrt/fx_basic_maps.cpp ('k') | core/fxcrt/plex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698