diff options
author | John Abd-El-Malek <jabdelmalek@google.com> | 2014-05-23 17:28:10 -0700 |
---|---|---|
committer | John Abd-El-Malek <jabdelmalek@google.com> | 2014-05-23 17:41:56 -0700 |
commit | 3f3b45cc74b0499912409f766a595945dbbfc4c5 (patch) | |
tree | ec400b6965477b88ea7f0d335f7e5c52044c346c /core/src/fxcodec/jbig2/JBig2_List.h | |
parent | 6fe4aed948337175f6f7f81bb03c37b9c7f535da (diff) | |
download | pdfium-3f3b45cc74b0499912409f766a595945dbbfc4c5.tar.xz |
Convert all line endings to LF.
Diffstat (limited to 'core/src/fxcodec/jbig2/JBig2_List.h')
-rw-r--r-- | core/src/fxcodec/jbig2/JBig2_List.h | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_List.h b/core/src/fxcodec/jbig2/JBig2_List.h index a737d9e112..9292724b1e 100644 --- a/core/src/fxcodec/jbig2/JBig2_List.h +++ b/core/src/fxcodec/jbig2/JBig2_List.h @@ -1,67 +1,67 @@ -// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef _JBIG2_LIST_H_
-#define _JBIG2_LIST_H_
-#include "JBig2_Define.h"
-#include "JBig2_Object.h"
-template <class TYPE>
-class CJBig2_List : public CJBig2_Object
-{
-public:
-
- CJBig2_List(FX_INT32 nSize = 8)
- {
- m_nSize = nSize;
- m_pArray = (TYPE**)m_pModule->JBig2_Malloc2(sizeof(TYPE*), nSize);
- m_nLength = 0;
- }
-
- ~CJBig2_List()
- {
- clear();
- m_pModule->JBig2_Free(m_pArray);
- }
-
- void clear()
- {
- FX_INT32 i;
- for(i = 0; i < m_nLength; i++) {
- delete m_pArray[i];
- }
- m_nLength = 0;
- }
-
- void addItem(TYPE *pItem)
- {
- if(m_nLength >= m_nSize) {
- m_nSize += 8;
- m_pArray = (TYPE**)m_pModule->JBig2_Realloc(m_pArray, sizeof(TYPE*)*m_nSize);
- }
- m_pArray[m_nLength++] = pItem;
- }
-
-
- FX_INT32 getLength()
- {
- return m_nLength;
- }
-
- TYPE *getAt(FX_INT32 nIndex)
- {
- return m_pArray[nIndex];
- }
-
- TYPE *getLast()
- {
- return m_pArray[m_nLength - 1];
- }
-private:
- FX_INT32 m_nSize;
- TYPE **m_pArray;
- FX_INT32 m_nLength;
-};
-#endif
+// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef _JBIG2_LIST_H_ +#define _JBIG2_LIST_H_ +#include "JBig2_Define.h" +#include "JBig2_Object.h" +template <class TYPE> +class CJBig2_List : public CJBig2_Object +{ +public: + + CJBig2_List(FX_INT32 nSize = 8) + { + m_nSize = nSize; + m_pArray = (TYPE**)m_pModule->JBig2_Malloc2(sizeof(TYPE*), nSize); + m_nLength = 0; + } + + ~CJBig2_List() + { + clear(); + m_pModule->JBig2_Free(m_pArray); + } + + void clear() + { + FX_INT32 i; + for(i = 0; i < m_nLength; i++) { + delete m_pArray[i]; + } + m_nLength = 0; + } + + void addItem(TYPE *pItem) + { + if(m_nLength >= m_nSize) { + m_nSize += 8; + m_pArray = (TYPE**)m_pModule->JBig2_Realloc(m_pArray, sizeof(TYPE*)*m_nSize); + } + m_pArray[m_nLength++] = pItem; + } + + + FX_INT32 getLength() + { + return m_nLength; + } + + TYPE *getAt(FX_INT32 nIndex) + { + return m_pArray[nIndex]; + } + + TYPE *getLast() + { + return m_pArray[m_nLength - 1]; + } +private: + FX_INT32 m_nSize; + TYPE **m_pArray; + FX_INT32 m_nLength; +}; +#endif |