| OLD | NEW | 
|    1 // Copyright 2016 PDFium Authors. All rights reserved. |    1 // Copyright 2016 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 "core/fpdfapi/parser/cpdf_dictionary.h" |    7 #include "core/fpdfapi/parser/cpdf_dictionary.h" | 
|    8  |    8  | 
|    9 #include <set> |    9 #include <set> | 
|   10 #include <utility> |   10 #include <utility> | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
|   23     : CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>()) {} |   23     : CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>()) {} | 
|   24  |   24  | 
|   25 CPDF_Dictionary::CPDF_Dictionary(const CFX_WeakPtr<CFX_ByteStringPool>& pPool) |   25 CPDF_Dictionary::CPDF_Dictionary(const CFX_WeakPtr<CFX_ByteStringPool>& pPool) | 
|   26     : m_pPool(pPool) {} |   26     : m_pPool(pPool) {} | 
|   27  |   27  | 
|   28 CPDF_Dictionary::~CPDF_Dictionary() { |   28 CPDF_Dictionary::~CPDF_Dictionary() { | 
|   29   // Mark the object as deleted so that it will not be deleted again |   29   // Mark the object as deleted so that it will not be deleted again | 
|   30   // in case of cyclic references. |   30   // in case of cyclic references. | 
|   31   m_ObjNum = kInvalidObjNum; |   31   m_ObjNum = kInvalidObjNum; | 
|   32   for (const auto& it : m_Map) { |   32   for (const auto& it : m_Map) { | 
|   33     if (it.second && it.second->GetObjNum() != kInvalidObjNum) |   33     if (it.second) | 
|   34       it.second->Release(); |   34       it.second->Release(); | 
|   35   } |   35   } | 
|   36 } |   36 } | 
|   37  |   37  | 
|   38 CPDF_Object::Type CPDF_Dictionary::GetType() const { |   38 CPDF_Object::Type CPDF_Dictionary::GetType() const { | 
|   39   return DICTIONARY; |   39   return DICTIONARY; | 
|   40 } |   40 } | 
|   41  |   41  | 
|   42 CPDF_Dictionary* CPDF_Dictionary::GetDict() const { |   42 CPDF_Dictionary* CPDF_Dictionary::GetDict() const { | 
|   43   // The method should be made non-const if we want to not be const. |   43   // The method should be made non-const if we want to not be const. | 
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  266   pArray->AddNumber(matrix.c); |  266   pArray->AddNumber(matrix.c); | 
|  267   pArray->AddNumber(matrix.d); |  267   pArray->AddNumber(matrix.d); | 
|  268   pArray->AddNumber(matrix.e); |  268   pArray->AddNumber(matrix.e); | 
|  269   pArray->AddNumber(matrix.f); |  269   pArray->AddNumber(matrix.f); | 
|  270   SetFor(key, pArray); |  270   SetFor(key, pArray); | 
|  271 } |  271 } | 
|  272  |  272  | 
|  273 CFX_ByteString CPDF_Dictionary::MaybeIntern(const CFX_ByteString& str) { |  273 CFX_ByteString CPDF_Dictionary::MaybeIntern(const CFX_ByteString& str) { | 
|  274   return m_pPool ? m_pPool->Intern(str) : str; |  274   return m_pPool ? m_pPool->Intern(str) : str; | 
|  275 } |  275 } | 
| OLD | NEW |