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/fxge/cfx_graphstatedata.h" 8 9 CFX_GraphStateData::CFX_GraphStateData() = default; 10 11 CFX_GraphStateData::CFX_GraphStateData(const CFX_GraphStateData& src) = default; 12 13 CFX_GraphStateData::CFX_GraphStateData(CFX_GraphStateData&& src) = default; 14 15 CFX_GraphStateData::~CFX_GraphStateData() = default; 16 17 CFX_GraphStateData& CFX_GraphStateData::operator=( 18 const CFX_GraphStateData& that) = default; 19 20 CFX_GraphStateData& CFX_GraphStateData::operator=(CFX_GraphStateData&& that) = 21 default; 22 23 CFX_RetainableGraphStateData::CFX_RetainableGraphStateData() = default; 24 25 // Note: can't default the copy constructor since Retainable has a deleted 26 // copy constructor (as it should). Instead, we want the default Retainable 27 // constructor to be invoked so as to create a copy with a ref-count of 1 as 28 // of the time it is created, then populate the remainder of the members from 29 // the |src| object. CFX_RetainableGraphStateData(const CFX_RetainableGraphStateData & src)30CFX_RetainableGraphStateData::CFX_RetainableGraphStateData( 31 const CFX_RetainableGraphStateData& src) 32 : CFX_GraphStateData(src) {} 33 34 CFX_RetainableGraphStateData::~CFX_RetainableGraphStateData() = default; 35 Clone() const36RetainPtr<CFX_RetainableGraphStateData> CFX_RetainableGraphStateData::Clone() 37 const { 38 return pdfium::MakeRetain<CFX_RetainableGraphStateData>(*this); 39 } 40