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

Side by Side Diff: xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.cpp

Issue 2467203003: Remove FX_BOOL from xfa. (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
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 // Original code is licensed as follows: 6 // Original code is licensed as follows:
7 /* 7 /*
8 * Copyright 2007 ZXing authors 8 * Copyright 2007 ZXing authors
9 * 9 *
10 * Licensed under the Apache License, Version 2.0 (the "License"); 10 * Licensed under the Apache License, Version 2.0 (the "License");
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } else { 63 } else {
64 m_coefficients.Copy(*coefficients); 64 m_coefficients.Copy(*coefficients);
65 } 65 }
66 } 66 }
67 CFX_Int32Array* CBC_ReedSolomonGF256Poly::GetCoefficients() { 67 CFX_Int32Array* CBC_ReedSolomonGF256Poly::GetCoefficients() {
68 return &m_coefficients; 68 return &m_coefficients;
69 } 69 }
70 int32_t CBC_ReedSolomonGF256Poly::GetDegree() { 70 int32_t CBC_ReedSolomonGF256Poly::GetDegree() {
71 return m_coefficients.GetSize() - 1; 71 return m_coefficients.GetSize() - 1;
72 } 72 }
73 FX_BOOL CBC_ReedSolomonGF256Poly::IsZero() { 73 bool CBC_ReedSolomonGF256Poly::IsZero() {
74 return m_coefficients[0] == 0; 74 return m_coefficients[0] == 0;
75 } 75 }
76 int32_t CBC_ReedSolomonGF256Poly::GetCoefficients(int32_t degree) { 76 int32_t CBC_ReedSolomonGF256Poly::GetCoefficients(int32_t degree) {
77 return m_coefficients[m_coefficients.GetSize() - 1 - degree]; 77 return m_coefficients[m_coefficients.GetSize() - 1 - degree];
78 } 78 }
79 int32_t CBC_ReedSolomonGF256Poly::EvaluateAt(int32_t a) { 79 int32_t CBC_ReedSolomonGF256Poly::EvaluateAt(int32_t a) {
80 if (a == 0) { 80 if (a == 0) {
81 return GetCoefficients(0); 81 return GetCoefficients(0);
82 } 82 }
83 int32_t size = m_coefficients.GetSize(); 83 int32_t size = m_coefficients.GetSize();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 CFX_ArrayTemplate<CBC_ReedSolomonGF256Poly*>* tempPtrA = 238 CFX_ArrayTemplate<CBC_ReedSolomonGF256Poly*>* tempPtrA =
239 new CFX_ArrayTemplate<CBC_ReedSolomonGF256Poly*>(); 239 new CFX_ArrayTemplate<CBC_ReedSolomonGF256Poly*>();
240 tempPtrA->Add(quotient.release()); 240 tempPtrA->Add(quotient.release());
241 tempPtrA->Add(remainder.release()); 241 tempPtrA->Add(remainder.release());
242 return tempPtrA; 242 return tempPtrA;
243 } 243 }
244 244
245 CBC_ReedSolomonGF256Poly::~CBC_ReedSolomonGF256Poly() { 245 CBC_ReedSolomonGF256Poly::~CBC_ReedSolomonGF256Poly() {
246 m_coefficients.RemoveAll(); 246 m_coefficients.RemoveAll();
247 } 247 }
OLDNEW
« no previous file with comments | « xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256Poly.h ('k') | xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698