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

Side by Side Diff: src/xml/SkDOM.cpp

Issue 1811723002: free -> reset (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: zarro boogs found Created 4 years, 9 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 | « src/utils/SkBitSet.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkDOM.h" 10 #include "SkDOM.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 SkXMLParser* SkDOM::beginParsing() { 367 SkXMLParser* SkDOM::beginParsing() {
368 SkASSERT(!fParser); 368 SkASSERT(!fParser);
369 fParser.reset(new SkDOMParser(&fAlloc)); 369 fParser.reset(new SkDOMParser(&fAlloc));
370 370
371 return fParser.get(); 371 return fParser.get();
372 } 372 }
373 373
374 const SkDOM::Node* SkDOM::finishParsing() { 374 const SkDOM::Node* SkDOM::finishParsing() {
375 SkASSERT(fParser); 375 SkASSERT(fParser);
376 fRoot = fParser->getRoot(); 376 fRoot = fParser->getRoot();
377 fParser.free(); 377 fParser.reset();
378 378
379 return fRoot; 379 return fRoot;
380 } 380 }
381 381
382 ////////////////////////////////////////////////////////////////////////// 382 //////////////////////////////////////////////////////////////////////////
383 383
384 int SkDOM::countChildren(const Node* node, const char elem[]) const 384 int SkDOM::countChildren(const Node* node, const char elem[]) const
385 { 385 {
386 int count = 0; 386 int count = 0;
387 387
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 SkASSERT(v == nullptr); 506 SkASSERT(v == nullptr);
507 507
508 SkASSERT(dom.getFirstChild(root, "elem1")); 508 SkASSERT(dom.getFirstChild(root, "elem1"));
509 SkASSERT(!dom.getFirstChild(root, "subelem1")); 509 SkASSERT(!dom.getFirstChild(root, "subelem1"));
510 510
511 dom.dump(); 511 dom.dump();
512 #endif 512 #endif
513 } 513 }
514 514
515 #endif 515 #endif
OLDNEW
« no previous file with comments | « src/utils/SkBitSet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698