OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CORE_INCLUDE_FXCRT_FX_BASIC_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_BASIC_H_ |
8 #define CORE_INCLUDE_FXCRT_FX_BASIC_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_BASIC_H_ |
9 | 9 |
10 #include "fx_memory.h" | 10 #include "fx_memory.h" |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 | 1053 |
1054 private: | 1054 private: |
1055 T* const m_Location; | 1055 T* const m_Location; |
1056 const T m_OldValue; | 1056 const T m_OldValue; |
1057 }; | 1057 }; |
1058 | 1058 |
1059 struct FxFreeDeleter { | 1059 struct FxFreeDeleter { |
1060 inline void operator()(void* ptr) const { FX_Free(ptr); } | 1060 inline void operator()(void* ptr) const { FX_Free(ptr); } |
1061 }; | 1061 }; |
1062 | 1062 |
1063 // Used with nonstd::unique_ptr to Release() objects that can't be deleted. | 1063 // Used with std::unique_ptr to Release() objects that can't be deleted. |
1064 template <class T> | 1064 template <class T> |
1065 struct ReleaseDeleter { | 1065 struct ReleaseDeleter { |
1066 inline void operator()(T* ptr) const { ptr->Release(); } | 1066 inline void operator()(T* ptr) const { ptr->Release(); } |
1067 }; | 1067 }; |
1068 | 1068 |
1069 #define FX_DATALIST_LENGTH 1024 | 1069 #define FX_DATALIST_LENGTH 1024 |
1070 template <size_t unit> | 1070 template <size_t unit> |
1071 class CFX_SortListArray { | 1071 class CFX_SortListArray { |
1072 protected: | 1072 protected: |
1073 struct DataList { | 1073 struct DataList { |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 FX_FLOAT c; | 1254 FX_FLOAT c; |
1255 FX_FLOAT d; | 1255 FX_FLOAT d; |
1256 FX_FLOAT e; | 1256 FX_FLOAT e; |
1257 FX_FLOAT f; | 1257 FX_FLOAT f; |
1258 FX_FLOAT g; | 1258 FX_FLOAT g; |
1259 FX_FLOAT h; | 1259 FX_FLOAT h; |
1260 FX_FLOAT i; | 1260 FX_FLOAT i; |
1261 }; | 1261 }; |
1262 | 1262 |
1263 #endif // CORE_INCLUDE_FXCRT_FX_BASIC_H_ | 1263 #endif // CORE_INCLUDE_FXCRT_FX_BASIC_H_ |
OLD | NEW |