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

Side by Side Diff: xfa/fxbarcode/oned/BC_OnedCode128Reader.h

Issue 2067903002: Make code compile with clang_use_chrome_plugin (part III) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 6 months 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 | « xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h ('k') | xfa/fxbarcode/oned/BC_OnedCode128Writer.h » ('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 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 XFA_FXBARCODE_ONED_BC_ONEDCODE128READER_H_ 7 #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODE128READER_H_
8 #define XFA_FXBARCODE_ONED_BC_ONEDCODE128READER_H_ 8 #define XFA_FXBARCODE_ONED_BC_ONEDCODE128READER_H_
9 9
10 #include "xfa/fxbarcode/oned/BC_OneDReader.h" 10 #include "xfa/fxbarcode/oned/BC_OneDReader.h"
11 11
12 class CBC_CommonBitArray; 12 class CBC_CommonBitArray;
13 13
14 class CBC_OnedCode128Reader : public CBC_OneDReader { 14 class CBC_OnedCode128Reader : public CBC_OneDReader {
15 public: 15 public:
16 CBC_OnedCode128Reader(); 16 CBC_OnedCode128Reader();
17 virtual ~CBC_OnedCode128Reader(); 17 ~CBC_OnedCode128Reader() override;
18 virtual CFX_ByteString DecodeRow(int32_t rowNumber, 18
19 CBC_CommonBitArray* row, 19 // CBC_OneDReader
20 int32_t hints, 20 CFX_ByteString DecodeRow(int32_t rowNumber,
21 int32_t& e); 21 CBC_CommonBitArray* row,
22 int32_t hints,
23 int32_t& e) override;
22 24
23 static const int32_t CODE_PATTERNS[107][7]; 25 static const int32_t CODE_PATTERNS[107][7];
24 26
25 private: 27 private:
26 static const int32_t MAX_AVG_VARIANCE = (int32_t)(256 * 0.25f); 28 static const int32_t MAX_AVG_VARIANCE = (int32_t)(256 * 0.25f);
27 static const int32_t MAX_INDIVIDUAL_VARIANCE = (int32_t)(256 * 0.7f); 29 static const int32_t MAX_INDIVIDUAL_VARIANCE = (int32_t)(256 * 0.7f);
28 30
29 static const int32_t CODE_SHIFT = 98; 31 static const int32_t CODE_SHIFT = 98;
30 static const int32_t CODE_CODE_C = 99; 32 static const int32_t CODE_CODE_C = 99;
31 static const int32_t CODE_CODE_B = 100; 33 static const int32_t CODE_CODE_B = 100;
(...skipping 10 matching lines...) Expand all
42 static const int32_t CODE_STOP = 106; 44 static const int32_t CODE_STOP = 106;
43 45
44 CFX_Int32Array* FindStartPattern(CBC_CommonBitArray* row, int32_t& e); 46 CFX_Int32Array* FindStartPattern(CBC_CommonBitArray* row, int32_t& e);
45 int32_t DecodeCode(CBC_CommonBitArray* row, 47 int32_t DecodeCode(CBC_CommonBitArray* row,
46 CFX_Int32Array* counters, 48 CFX_Int32Array* counters,
47 int32_t rowOffset, 49 int32_t rowOffset,
48 int32_t& e); 50 int32_t& e);
49 }; 51 };
50 52
51 #endif // XFA_FXBARCODE_ONED_BC_ONEDCODE128READER_H_ 53 #endif // XFA_FXBARCODE_ONED_BC_ONEDCODE128READER_H_
OLDNEW
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h ('k') | xfa/fxbarcode/oned/BC_OnedCode128Writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698