| 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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 }; | 1169 }; |
| 1170 template <typename T1, typename T2> | 1170 template <typename T1, typename T2> |
| 1171 class CFX_ListArrayTemplate { | 1171 class CFX_ListArrayTemplate { |
| 1172 public: | 1172 public: |
| 1173 void Clear() { m_Data.Clear(); } | 1173 void Clear() { m_Data.Clear(); } |
| 1174 | 1174 |
| 1175 void Add(int32_t nStart, int32_t nCount) { m_Data.Append(nStart, nCount); } | 1175 void Add(int32_t nStart, int32_t nCount) { m_Data.Append(nStart, nCount); } |
| 1176 | 1176 |
| 1177 T2& operator[](int32_t nIndex) { | 1177 T2& operator[](int32_t nIndex) { |
| 1178 uint8_t* data = m_Data.GetAt(nIndex); | 1178 uint8_t* data = m_Data.GetAt(nIndex); |
| 1179 FXSYS_assert(data != NULL); | 1179 FXSYS_assert(data); |
| 1180 return (T2&)(*(volatile T2*)data); | 1180 return (T2&)(*(volatile T2*)data); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 T2* GetPtrAt(int32_t nIndex) { return (T2*)m_Data.GetAt(nIndex); } | 1183 T2* GetPtrAt(int32_t nIndex) { return (T2*)m_Data.GetAt(nIndex); } |
| 1184 | 1184 |
| 1185 protected: | 1185 protected: |
| 1186 T1 m_Data; | 1186 T1 m_Data; |
| 1187 }; | 1187 }; |
| 1188 typedef CFX_ListArrayTemplate<CFX_SortListArray<sizeof(FX_FILESIZE)>, | 1188 typedef CFX_ListArrayTemplate<CFX_SortListArray<sizeof(FX_FILESIZE)>, |
| 1189 FX_FILESIZE> CFX_FileSizeListArray; | 1189 FX_FILESIZE> CFX_FileSizeListArray; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1255 FX_FLOAT c; | 1255 FX_FLOAT c; |
| 1256 FX_FLOAT d; | 1256 FX_FLOAT d; |
| 1257 FX_FLOAT e; | 1257 FX_FLOAT e; |
| 1258 FX_FLOAT f; | 1258 FX_FLOAT f; |
| 1259 FX_FLOAT g; | 1259 FX_FLOAT g; |
| 1260 FX_FLOAT h; | 1260 FX_FLOAT h; |
| 1261 FX_FLOAT i; | 1261 FX_FLOAT i; |
| 1262 }; | 1262 }; |
| 1263 | 1263 |
| 1264 #endif // CORE_INCLUDE_FXCRT_FX_BASIC_H_ | 1264 #endif // CORE_INCLUDE_FXCRT_FX_BASIC_H_ |
| OLD | NEW |