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

Side by Side Diff: core/fpdfdoc/cpvt_sectioninfo.cpp

Issue 2136683002: Use smart pointers for class owned member variables (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 5 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/fpdfdoc/cpvt_sectioninfo.h ('k') | core/fpdfdoc/cpvt_wordinfo.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 2016 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/fpdfdoc/cpvt_sectioninfo.h"
8
9 CPVT_SectionInfo::CPVT_SectionInfo() : rcSection(), nTotalLine(0) {}
10
11 CPVT_SectionInfo::~CPVT_SectionInfo() {}
12
13 CPVT_SectionInfo::CPVT_SectionInfo(const CPVT_SectionInfo& other) {
14 operator=(other);
15 }
16
17 void CPVT_SectionInfo::operator=(const CPVT_SectionInfo& other) {
18 if (this == &other)
19 return;
20
21 rcSection = other.rcSection;
22 nTotalLine = other.nTotalLine;
23 if (other.pSecProps)
24 pSecProps.reset(new CPVT_SecProps(*other.pSecProps));
25 else
26 pSecProps.reset();
27 if (other.pWordProps)
28 pWordProps.reset(new CPVT_WordProps(*other.pWordProps));
29 else
30 pWordProps.reset();
31 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpvt_sectioninfo.h ('k') | core/fpdfdoc/cpvt_wordinfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698