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

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

Issue 1265503005: clang-format all pdfium code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 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 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../include/fxcrt/fx_memory.h" 7 #include "../../include/fxcrt/fx_memory.h"
8 #include "plex.h" 8 #include "plex.h"
9 9
10 CFX_Plex* CFX_Plex::Create(CFX_Plex*& pHead, FX_DWORD nMax, FX_DWORD cbElement) 10 CFX_Plex* CFX_Plex::Create(CFX_Plex*& pHead,
11 { 11 FX_DWORD nMax,
12 CFX_Plex* p = (CFX_Plex*)FX_Alloc(uint8_t, sizeof(CFX_Plex) + nMax * cbEleme nt); 12 FX_DWORD cbElement) {
13 p->pNext = pHead; 13 CFX_Plex* p =
14 pHead = p; 14 (CFX_Plex*)FX_Alloc(uint8_t, sizeof(CFX_Plex) + nMax * cbElement);
15 return p; 15 p->pNext = pHead;
16 pHead = p;
17 return p;
16 } 18 }
17 void CFX_Plex::FreeDataChain() 19 void CFX_Plex::FreeDataChain() {
18 { 20 CFX_Plex* p = this;
19 CFX_Plex* p = this; 21 while (p != NULL) {
20 while (p != NULL) { 22 uint8_t* bytes = (uint8_t*)p;
21 uint8_t* bytes = (uint8_t*)p; 23 CFX_Plex* pNext = p->pNext;
22 CFX_Plex* pNext = p->pNext; 24 FX_Free(bytes);
23 FX_Free(bytes); 25 p = pNext;
24 p = pNext; 26 }
25 }
26 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698