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

Side by Side Diff: core/fxcodec/jbig2/JBig2_BitStream.cpp

Issue 2477443002: Remove FX_BOOL from core (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « core/fxcodec/jbig2/JBig2_BitStream.h ('k') | core/fxcodec/jbig2/JBig2_Context.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 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/fxcodec/jbig2/JBig2_BitStream.h" 7 #include "core/fxcodec/jbig2/JBig2_BitStream.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 int32_t CJBig2_BitStream::read1Bit(uint32_t* dwResult) { 67 int32_t CJBig2_BitStream::read1Bit(uint32_t* dwResult) {
68 if (!IsInBound()) 68 if (!IsInBound())
69 return -1; 69 return -1;
70 70
71 *dwResult = (m_pBuf[m_dwByteIdx] >> (7 - m_dwBitIdx)) & 0x01; 71 *dwResult = (m_pBuf[m_dwByteIdx] >> (7 - m_dwBitIdx)) & 0x01;
72 AdvanceBit(); 72 AdvanceBit();
73 return 0; 73 return 0;
74 } 74 }
75 75
76 int32_t CJBig2_BitStream::read1Bit(FX_BOOL* bResult) { 76 int32_t CJBig2_BitStream::read1Bit(bool* bResult) {
77 if (!IsInBound()) 77 if (!IsInBound())
78 return -1; 78 return -1;
79 79
80 *bResult = (m_pBuf[m_dwByteIdx] >> (7 - m_dwBitIdx)) & 0x01; 80 *bResult = (m_pBuf[m_dwByteIdx] >> (7 - m_dwBitIdx)) & 0x01;
81 AdvanceBit(); 81 AdvanceBit();
82 return 0; 82 return 0;
83 } 83 }
84 84
85 int32_t CJBig2_BitStream::read1Byte(uint8_t* cResult) { 85 int32_t CJBig2_BitStream::read1Byte(uint8_t* cResult) {
86 if (!IsInBound()) 86 if (!IsInBound())
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return m_dwByteIdx < m_dwLength; 180 return m_dwByteIdx < m_dwLength;
181 } 181 }
182 182
183 uint32_t CJBig2_BitStream::LengthInBits() const { 183 uint32_t CJBig2_BitStream::LengthInBits() const {
184 return m_dwLength << 3; 184 return m_dwLength << 3;
185 } 185 }
186 186
187 uint32_t CJBig2_BitStream::getObjNum() const { 187 uint32_t CJBig2_BitStream::getObjNum() const {
188 return m_dwObjNum; 188 return m_dwObjNum;
189 } 189 }
OLDNEW
« no previous file with comments | « core/fxcodec/jbig2/JBig2_BitStream.h ('k') | core/fxcodec/jbig2/JBig2_Context.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698