Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Side by Side Diff: core/include/fxcrt/fx_basic.h

Issue 1523523002: Fix hint table loading issues. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: im dumb Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 FX_DWORD GetBits(FX_DWORD nBits); 804 FX_DWORD GetBits(FX_DWORD nBits);
805 805
806 void ByteAlign(); 806 void ByteAlign();
807 807
808 FX_BOOL IsEOF() { return m_BitPos >= m_BitSize; } 808 FX_BOOL IsEOF() { return m_BitPos >= m_BitSize; }
809 809
810 void SkipBits(FX_DWORD nBits) { m_BitPos += nBits; } 810 void SkipBits(FX_DWORD nBits) { m_BitPos += nBits; }
811 811
812 void Rewind() { m_BitPos = 0; } 812 void Rewind() { m_BitPos = 0; }
813 813
814 FX_DWORD GetPos() const { return m_BitPos; }
815
816 FX_DWORD BitsRemaining() const {
817 return m_BitSize >= m_BitPos ? m_BitSize - m_BitPos : 0;
818 }
819
814 protected: 820 protected:
815 FX_DWORD m_BitPos; 821 FX_DWORD m_BitPos;
816 822
817 FX_DWORD m_BitSize; 823 FX_DWORD m_BitSize;
818 824
819 const uint8_t* m_pData; 825 const uint8_t* m_pData;
820 }; 826 };
821 template <class ObjClass> 827 template <class ObjClass>
822 class CFX_CountRef { 828 class CFX_CountRef {
823 public: 829 public:
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 FX_FLOAT c; 1141 FX_FLOAT c;
1136 FX_FLOAT d; 1142 FX_FLOAT d;
1137 FX_FLOAT e; 1143 FX_FLOAT e;
1138 FX_FLOAT f; 1144 FX_FLOAT f;
1139 FX_FLOAT g; 1145 FX_FLOAT g;
1140 FX_FLOAT h; 1146 FX_FLOAT h;
1141 FX_FLOAT i; 1147 FX_FLOAT i;
1142 }; 1148 };
1143 1149
1144 #endif // CORE_INCLUDE_FXCRT_FX_BASIC_H_ 1150 #endif // CORE_INCLUDE_FXCRT_FX_BASIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698