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