summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-09 09:59:23 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-03-09 09:59:23 -0500
commit3ebd121d45ceb08918a3dcb5b3b7ac29448c862f (patch)
tree361d5fa0f9be7484cce4aace1b9cc18545046611 /xfa
parent317758574e173367b41928a1575d70600c6b6ea8 (diff)
downloadpdfium-3ebd121d45ceb08918a3dcb5b3b7ac29448c862f.tar.xz
Review and cleanup lint warnings.
This CL goes through the remaining list of list warnings and records why they are currently blacklisted, or fixes and enables them. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1773733002 .
Diffstat (limited to 'xfa')
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.h2
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.cpp2
-rw-r--r--xfa/src/fgas/src/crt/fx_algorithm.cpp10
-rw-r--r--xfa/src/fwl/basewidget/fwl_editimp.cpp1
-rw-r--r--xfa/src/fwl/lightwidget/edit.cpp1
-rw-r--r--xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp3
-rw-r--r--xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h5
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h22
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h3
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDReader.cpp3
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDReader.h5
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimReader.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimReader.h14
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp1
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h10
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp18
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h38
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h10
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoder.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h6
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h18
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h8
-rw-r--r--xfa/src/fxfa/app/xfa_fftextedit.cpp2
-rw-r--r--xfa/src/fxfa/app/xfa_fftextedit.h2
-rw-r--r--xfa/src/fxfa/app/xfa_ffwidget.cpp4
-rw-r--r--xfa/src/fxfa/app/xfa_ffwidgethandler.cpp2
32 files changed, 105 insertions, 105 deletions
diff --git a/xfa/src/fdp/src/css/fde_csscache.h b/xfa/src/fdp/src/css/fde_csscache.h
index 9e13d50087..dad87e96f7 100644
--- a/xfa/src/fdp/src/css/fde_csscache.h
+++ b/xfa/src/fdp/src/css/fde_csscache.h
@@ -7,6 +7,8 @@
#ifndef XFA_SRC_FDP_SRC_CSS_FDE_CSSCACHE_H_
#define XFA_SRC_FDP_SRC_CSS_FDE_CSSCACHE_H_
+#include <map>
+
#include "xfa/src/fdp/include/fde_css.h"
#include "xfa/src/fgas/include/fx_mem.h"
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
index 68bb570769..7fd9dee835 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
@@ -6,6 +6,8 @@
#include "xfa/src/fdp/src/css/fde_cssstyleselector.h"
+#include <algorithm>
+
#include "xfa/src/fdp/src/css/fde_csscache.h"
#include "xfa/src/fdp/src/css/fde_cssdeclaration.h"
diff --git a/xfa/src/fgas/src/crt/fx_algorithm.cpp b/xfa/src/fgas/src/crt/fx_algorithm.cpp
index 3d1f58a9e7..7de22b73fa 100644
--- a/xfa/src/fgas/src/crt/fx_algorithm.cpp
+++ b/xfa/src/fgas/src/crt/fx_algorithm.cpp
@@ -10,7 +10,7 @@
extern "C" {
#endif
-const static FX_CHAR g_FXBase64EncoderMap[64] = {
+static const FX_CHAR g_FXBase64EncoderMap[64] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
@@ -87,7 +87,8 @@ int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst) {
}
return pDstEnd - pDst;
}
-const static uint8_t g_FXBase64DecoderMap[256] = {
+
+static const uint8_t g_FXBase64DecoderMap[256] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -254,7 +255,8 @@ int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) {
}
return pDstEnd - pDst;
}
-const static uint8_t g_FXHex2DecMap[256] = {
+
+static const uint8_t g_FXHex2DecMap[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0,
@@ -298,5 +300,5 @@ int32_t FX_SeparateStringW(const FX_WCHAR* pStr,
return pieces.GetSize();
}
#ifdef __cplusplus
-};
+}
#endif
diff --git a/xfa/src/fwl/basewidget/fwl_editimp.cpp b/xfa/src/fwl/basewidget/fwl_editimp.cpp
index 5afaee1357..d60bc11aa5 100644
--- a/xfa/src/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/src/fwl/basewidget/fwl_editimp.cpp
@@ -7,6 +7,7 @@
#include "xfa/src/fwl/basewidget/fwl_editimp.h"
#include <algorithm>
+#include <vector>
#include "xfa/include/fwl/basewidget/fwl_caret.h"
#include "xfa/include/fwl/basewidget/fwl_datetimepicker.h"
diff --git a/xfa/src/fwl/lightwidget/edit.cpp b/xfa/src/fwl/lightwidget/edit.cpp
index cf87ae031d..303943a8f6 100644
--- a/xfa/src/fwl/lightwidget/edit.cpp
+++ b/xfa/src/fwl/lightwidget/edit.cpp
@@ -7,6 +7,7 @@
#include "xfa/include/fwl/lightwidget/edit.h"
#include <memory>
+#include <vector>
#include "xfa/include/fwl/basewidget/fwl_edit.h"
diff --git a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp
index cc1b435f00..4e33691e08 100644
--- a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp
+++ b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp
@@ -28,9 +28,6 @@
#include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h"
#include "xfa/src/fxbarcode/utils.h"
-const int32_t CBC_WhiteRectangleDetector::INIT_SIZE = 30;
-const int32_t CBC_WhiteRectangleDetector::CORR = 1;
-
CBC_WhiteRectangleDetector::CBC_WhiteRectangleDetector(
CBC_CommonBitMatrix* image) {
m_image = image;
diff --git a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h
index ccd6a84a0d..4af04ac1fc 100644
--- a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h
+++ b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h
@@ -38,8 +38,9 @@ class CBC_WhiteRectangleDetector {
int32_t b,
int32_t fixed,
FX_BOOL horizontal);
- const static int32_t INIT_SIZE;
- const static int32_t CORR;
+
+ static const int32_t INIT_SIZE = 30;
+ static const int32_t CORR = 1;
CBC_CommonBitMatrix* m_image;
int32_t m_height;
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h
index ba23976842..eba1828d19 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h
@@ -41,18 +41,18 @@ class CBC_DataMatrixDecodedBitStreamParser {
static uint8_t Unrandomize255State(int32_t randomizedBase256Codeword,
int32_t base256CodewordPosition);
- const static FX_CHAR C40_BASIC_SET_CHARS[];
- const static FX_CHAR C40_SHIFT2_SET_CHARS[];
+ static const FX_CHAR C40_BASIC_SET_CHARS[];
+ static const FX_CHAR C40_SHIFT2_SET_CHARS[];
- const static FX_CHAR TEXT_BASIC_SET_CHARS[];
- const static FX_CHAR TEXT_SHIFT3_SET_CHARS[];
- const static int32_t PAD_ENCODE;
- const static int32_t ASCII_ENCODE;
- const static int32_t C40_ENCODE;
- const static int32_t TEXT_ENCODE;
- const static int32_t ANSIX12_ENCODE;
- const static int32_t EDIFACT_ENCODE;
- const static int32_t BASE256_ENCODE;
+ static const FX_CHAR TEXT_BASIC_SET_CHARS[];
+ static const FX_CHAR TEXT_SHIFT3_SET_CHARS[];
+ static const int32_t PAD_ENCODE;
+ static const int32_t ASCII_ENCODE;
+ static const int32_t C40_ENCODE;
+ static const int32_t TEXT_ENCODE;
+ static const int32_t ANSIX12_ENCODE;
+ static const int32_t EDIFACT_ENCODE;
+ static const int32_t BASE256_ENCODE;
};
#endif // XFA_SRC_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDECODEDBITSTREAMPARSER_H_
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h
index 123f75101b..34cbcb9418 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h
@@ -69,9 +69,10 @@ class CBC_DataMatrixDetector {
virtual void Init(int32_t& e);
private:
+ static const int32_t INTEGERS[5];
+
CBC_CommonBitMatrix* m_image;
CBC_WhiteRectangleDetector* m_rectangleDetector;
- const static int32_t INTEGERS[5];
};
#endif // XFA_SRC_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDETECTOR_H_
diff --git a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
index 76d05042da..9ecb20e671 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
@@ -29,9 +29,6 @@
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/utils.h"
-const int32_t CBC_OneDReader::INTEGER_MATH_SHIFT = 8;
-const int32_t CBC_OneDReader::PATTERN_MATCH_RESULT_SCALE_FACTOR = 1 << 8;
-
CBC_OneDReader::CBC_OneDReader() {}
CBC_OneDReader::~CBC_OneDReader() {}
CFX_ByteString CBC_OneDReader::Decode(CBC_BinaryBitmap* image, int32_t& e) {
diff --git a/xfa/src/fxbarcode/oned/BC_OneDReader.h b/xfa/src/fxbarcode/oned/BC_OneDReader.h
index 27a1a3d7ee..bcd7cbc8b5 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDReader.h
+++ b/xfa/src/fxbarcode/oned/BC_OneDReader.h
@@ -31,8 +31,9 @@ class CBC_OneDReader : public CBC_Reader {
CFX_ByteString DeDecode(CBC_BinaryBitmap* image, int32_t hints, int32_t& e);
protected:
- const static int32_t INTEGER_MATH_SHIFT;
- const static int32_t PATTERN_MATCH_RESULT_SCALE_FACTOR;
+ static const int32_t INTEGER_MATH_SHIFT = 8;
+ static const int32_t PATTERN_MATCH_RESULT_SCALE_FACTOR = 1 << 8;
+
void RecordPattern(CBC_CommonBitArray* row,
int32_t start,
CFX_Int32Array* counters,
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
index da1f47bfe8..07b8657189 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
@@ -29,8 +29,6 @@
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/utils.h"
-const int32_t CBC_OneDimReader::MAX_AVG_VARIANCE = (int32_t)(256 * 0.48f);
-const int32_t CBC_OneDimReader::MAX_INDIVIDUAL_VARIANCE = (int32_t)(256 * 0.7f);
const int32_t CBC_OneDimReader::START_END_PATTERN[3] = {1, 1, 1};
const int32_t CBC_OneDimReader::MIDDLE_PATTERN[5] = {1, 1, 1, 1, 1};
const int32_t CBC_OneDimReader::L_PATTERNS[10][4] = {
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimReader.h b/xfa/src/fxbarcode/oned/BC_OneDimReader.h
index 3374bec63a..9e5789afb9 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimReader.h
+++ b/xfa/src/fxbarcode/oned/BC_OneDimReader.h
@@ -14,18 +14,20 @@ class CBC_CommonBitArray;
class CBC_OneDimReader : public CBC_OneDReader {
private:
- const static int32_t MAX_AVG_VARIANCE;
- const static int32_t MAX_INDIVIDUAL_VARIANCE;
+ static const int32_t MAX_AVG_VARIANCE = (int32_t)(256 * 0.48f);
+ static const int32_t MAX_INDIVIDUAL_VARIANCE = (int32_t)(256 * 0.7f);
FX_BOOL CheckStandardUPCEANChecksum(CFX_ByteString& s, int32_t& e);
public:
- const static int32_t START_END_PATTERN[3];
- const static int32_t MIDDLE_PATTERN[5];
- const static int32_t L_PATTERNS[10][4];
- const static int32_t L_AND_G_PATTERNS[20][4];
+ static const int32_t START_END_PATTERN[3];
+ static const int32_t MIDDLE_PATTERN[5];
+ static const int32_t L_PATTERNS[10][4];
+ static const int32_t L_AND_G_PATTERNS[20][4];
+
CBC_OneDimReader();
virtual ~CBC_OneDimReader();
+
CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
index 3cbad1eade..5d2d447efc 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
@@ -38,7 +38,6 @@ const int32_t CBC_OnedCodaBarReader::CHARACTER_ENCODINGS[22] = {
0x003, 0x006, 0x009, 0x060, 0x012, 0x042, 0x021, 0x024,
0x030, 0x048, 0x00c, 0x018, 0x045, 0x051, 0x054, 0x015,
0x01A, 0x029, 0x00B, 0x00E, 0x01A, 0x029};
-const int32_t CBC_OnedCodaBarReader::minCharacterLength = 3;
const FX_CHAR CBC_OnedCodaBarReader::STARTEND_ENCODING[8] = {
'E', '*', 'A', 'B', 'C', 'D', 'T', 'N'};
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h
index cbb47fb554..49c136f4fd 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h
@@ -24,13 +24,13 @@ class CBC_OnedCodaBarReader : public CBC_OneDReader {
CFX_Int32Array* FindAsteriskPattern(CBC_CommonBitArray* row, int32_t& e);
FX_BOOL ArrayContains(const FX_CHAR array[], FX_CHAR key);
FX_CHAR ToNarrowWidePattern(CFX_Int32Array* counter);
- static const FX_CHAR* ALPHABET_STRING;
-
- const static int32_t CHARACTER_ENCODINGS[22];
- const static int32_t minCharacterLength;
+ static const FX_CHAR* ALPHABET_STRING;
+ static const int32_t CHARACTER_ENCODINGS[22];
- const static FX_CHAR STARTEND_ENCODING[8];
+ private:
+ static const int32_t minCharacterLength = 3;
+ static const FX_CHAR STARTEND_ENCODING[8];
};
#endif // XFA_SRC_FXBARCODE_ONED_BC_ONEDCODABARREADER_H_
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h
index 3671821bce..8f9ca5883d 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h
@@ -44,8 +44,8 @@ class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
int32_t codeLength,
FX_BOOL isDevice,
int32_t& e);
- const static FX_CHAR START_END_CHARS[];
- const static FX_CHAR CONTENT_CHARS[];
+ static const FX_CHAR START_END_CHARS[];
+ static const FX_CHAR CONTENT_CHARS[];
FX_CHAR m_chStart;
FX_CHAR m_chEnd;
int32_t m_iWideNarrRatio;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
index 33be8c57d7..41a6ad1d05 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
@@ -65,22 +65,7 @@ const int32_t CBC_OnedCode128Reader::CODE_PATTERNS[107][7] = {
{1, 1, 3, 1, 4, 1, 0}, {1, 1, 4, 1, 3, 1, 0}, {3, 1, 1, 1, 4, 1, 0},
{4, 1, 1, 1, 3, 1, 0}, {2, 1, 1, 4, 1, 2, 0}, {2, 1, 1, 2, 1, 4, 0},
{2, 1, 1, 2, 3, 2, 0}, {2, 3, 3, 1, 1, 1, 2}};
-const int32_t CBC_OnedCode128Reader::MAX_AVG_VARIANCE = (int32_t)(256 * 0.25f);
-const int32_t CBC_OnedCode128Reader::MAX_INDIVIDUAL_VARIANCE =
- (int32_t)(256 * 0.7f);
-const int32_t CBC_OnedCode128Reader::CODE_SHIFT = 98;
-const int32_t CBC_OnedCode128Reader::CODE_CODE_C = 99;
-const int32_t CBC_OnedCode128Reader::CODE_CODE_B = 100;
-const int32_t CBC_OnedCode128Reader::CODE_CODE_A = 101;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_1 = 102;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_2 = 97;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_3 = 96;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_4_A = 101;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_4_B = 100;
-const int32_t CBC_OnedCode128Reader::CODE_START_A = 103;
-const int32_t CBC_OnedCode128Reader::CODE_START_B = 104;
-const int32_t CBC_OnedCode128Reader::CODE_START_C = 105;
-const int32_t CBC_OnedCode128Reader::CODE_STOP = 106;
+
CBC_OnedCode128Reader::CBC_OnedCode128Reader() {}
CBC_OnedCode128Reader::~CBC_OnedCode128Reader() {}
CFX_Int32Array* CBC_OnedCode128Reader::FindStartPattern(CBC_CommonBitArray* row,
@@ -306,6 +291,7 @@ CFX_ByteString CBC_OnedCode128Reader::DecodeRow(int32_t rowNumber,
result += '0';
}
FX_CHAR temp[128];
+ // TODO(dsinclair): Should this be snprintf?
sprintf(temp, "%d", code);
result += temp;
} else {
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h
index a99c0e89f8..1d2c6a1ce0 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h
@@ -17,26 +17,28 @@ class CBC_OnedCode128Reader : public CBC_OneDReader {
CBC_CommonBitArray* row,
int32_t hints,
int32_t& e);
- const static int32_t CODE_PATTERNS[107][7];
- const static int32_t MAX_AVG_VARIANCE;
- const static int32_t MAX_INDIVIDUAL_VARIANCE;
-
- const static int32_t CODE_SHIFT;
- const static int32_t CODE_CODE_C;
- const static int32_t CODE_CODE_B;
- const static int32_t CODE_CODE_A;
- const static int32_t CODE_FNC_1;
- const static int32_t CODE_FNC_2;
- const static int32_t CODE_FNC_3;
- const static int32_t CODE_FNC_4_A;
- const static int32_t CODE_FNC_4_B;
-
- const static int32_t CODE_START_A;
- const static int32_t CODE_START_B;
- const static int32_t CODE_START_C;
- const static int32_t CODE_STOP;
+
+ static const int32_t CODE_PATTERNS[107][7];
private:
+ static const int32_t MAX_AVG_VARIANCE = (int32_t)(256 * 0.25f);
+ static const int32_t MAX_INDIVIDUAL_VARIANCE = (int32_t)(256 * 0.7f);
+
+ static const int32_t CODE_SHIFT = 98;
+ static const int32_t CODE_CODE_C = 99;
+ static const int32_t CODE_CODE_B = 100;
+ static const int32_t CODE_CODE_A = 101;
+ static const int32_t CODE_FNC_1 = 102;
+ static const int32_t CODE_FNC_2 = 97;
+ static const int32_t CODE_FNC_3 = 96;
+ static const int32_t CODE_FNC_4_A = 101;
+ static const int32_t CODE_FNC_4_B = 100;
+
+ static const int32_t CODE_START_A = 103;
+ static const int32_t CODE_START_B = 104;
+ static const int32_t CODE_START_C = 105;
+ static const int32_t CODE_STOP = 106;
+
CFX_Int32Array* FindStartPattern(CBC_CommonBitArray* row, int32_t& e);
int32_t DecodeCode(CBC_CommonBitArray* row,
CFX_Int32Array* counters,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h
index 333d3c563b..1fbb02832b 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h
@@ -39,11 +39,11 @@ class CBC_OnedCode128Writer : public CBC_OneDimWriter {
int32_t Encode128B(const CFX_ByteString& contents, CFX_PtrArray& patterns);
int32_t Encode128C(const CFX_ByteString& contents, CFX_PtrArray& patterns);
BC_TYPE m_codeFormat;
- const static int32_t CODE_START_B;
- const static int32_t CODE_START_C;
- const static int32_t CODE_CODE_B;
- const static int32_t CODE_CODE_C;
- const static int32_t CODE_STOP;
+ static const int32_t CODE_START_B;
+ static const int32_t CODE_START_C;
+ static const int32_t CODE_CODE_B;
+ static const int32_t CODE_CODE_C;
+ static const int32_t CODE_STOP;
};
#endif // XFA_SRC_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h
index b3fa803cd7..b5573b1bdf 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h
@@ -13,8 +13,8 @@ class CBC_OnedCode39Reader : public CBC_OneDReader {
public:
static const FX_CHAR* ALPHABET_STRING;
static const FX_CHAR* CHECKSUM_STRING;
- const static int32_t CHARACTER_ENCODINGS[44];
- const static int32_t ASTERISK_ENCODING;
+ static const int32_t CHARACTER_ENCODINGS[44];
+ static const int32_t ASTERISK_ENCODING;
CBC_OnedCode39Reader();
CBC_OnedCode39Reader(FX_BOOL usingCheckDigit);
CBC_OnedCode39Reader(FX_BOOL usingCheckDigit, FX_BOOL extendedMode);
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h b/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h
index cf9e647c85..795cc2fbde 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h
@@ -11,7 +11,7 @@ class CBC_CommonBitArray;
class CBC_OnedEAN13Reader;
class CBC_OnedEAN13Reader : public CBC_OneDimReader {
public:
- const static int32_t FIRST_DIGIT_ENCODINGS[10];
+ static const int32_t FIRST_DIGIT_ENCODINGS[10];
CBC_OnedEAN13Reader();
virtual ~CBC_OnedEAN13Reader();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoder.h b/xfa/src/fxbarcode/qrcode/BC_QRCoder.h
index e7087b33d7..6a44b53a6d 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoder.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoder.h
@@ -25,7 +25,7 @@ class CBC_QRCoder {
CBC_CommonByteMatrix* m_matrix;
public:
- const static int32_t NUM_MASK_PATTERNS;
+ static const int32_t NUM_MASK_PATTERNS;
CBC_QRCoder();
virtual ~CBC_QRCoder();
CBC_QRCoderMode* GetMode();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h
index 70dad949c6..f1b6504b2f 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h
@@ -19,7 +19,7 @@ class CBC_CommonByteMatrix;
class CBC_QRCoderEncoder {
private:
- const static int32_t m_alphaNumbericTable[96];
+ static const int32_t m_alphaNumbericTable[96];
public:
CBC_QRCoderEncoder();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h
index 4d6402a20b..61870d788d 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h
@@ -10,9 +10,9 @@
class CBC_QRCoderErrorCorrectionLevel;
class CBC_QRCoderFormatInformation {
private:
- const static int32_t FORMAT_INFO_MASK_QR;
- const static int32_t FORMAT_INFO_DECODE_LOOKUP[32][2];
- const static int32_t BITS_SET_IN_HALF_BYTE[16];
+ static const int32_t FORMAT_INFO_MASK_QR;
+ static const int32_t FORMAT_INFO_DECODE_LOOKUP[32][2];
+ static const int32_t BITS_SET_IN_HALF_BYTE[16];
CBC_QRCoderErrorCorrectionLevel* m_errorCorrectLevl;
uint8_t m_dataMask;
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
index be38c8a4ff..6676b8389d 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
@@ -12,15 +12,15 @@ class CBC_QRCoderErrorCorrectionLevel;
class CBC_QRCoderBitVector;
class CBC_QRCoderMatrixUtil {
private:
- const static int32_t POSITION_DETECTION_PATTERN[7][7];
- const static int32_t VERTICAL_SEPARATION_PATTERN[7][1];
- const static int32_t HORIZONTAL_SEPARATION_PATTERN[1][8];
- const static int32_t POSITION_ADJUSTMENT_PATTERN[5][5];
- const static int32_t POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7];
- const static int32_t TYPE_INFO_COORDINATES[15][2];
- const static int32_t VERSION_INFO_POLY;
- const static int32_t TYPE_INFO_POLY;
- const static int32_t TYPE_INFO_MASK_PATTERN;
+ static const int32_t POSITION_DETECTION_PATTERN[7][7];
+ static const int32_t VERTICAL_SEPARATION_PATTERN[7][1];
+ static const int32_t HORIZONTAL_SEPARATION_PATTERN[1][8];
+ static const int32_t POSITION_ADJUSTMENT_PATTERN[5][5];
+ static const int32_t POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7];
+ static const int32_t TYPE_INFO_COORDINATES[15][2];
+ static const int32_t VERSION_INFO_POLY;
+ static const int32_t TYPE_INFO_POLY;
+ static const int32_t TYPE_INFO_MASK_PATTERN;
public:
CBC_QRCoderMatrixUtil();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h
index 755a7345dc..ceb6f91930 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h
@@ -15,7 +15,7 @@ class CBC_QRCoderErrorCorrectionLevel;
class CBC_QRCoderVersion {
private:
- const static int32_t VERSION_DECODE_INFO[34];
+ static const int32_t VERSION_DECODE_INFO[34];
static CFX_PtrArray* VERSION;
int32_t m_versionNumber;
int32_t m_totalCodeWords;
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h
index c014e4dec7..ca64ab0fb0 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h
@@ -14,7 +14,7 @@ class CBC_QRCoderVersion;
class CBC_CommonCharacterSetECI;
class CBC_QRDecodedBitStreamParser {
private:
- const static FX_CHAR ALPHANUMERIC_CHARS[45];
+ static const FX_CHAR ALPHANUMERIC_CHARS[45];
static const FX_CHAR* UTF_8;
CBC_QRDecodedBitStreamParser();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h
index aa731b6cdb..b7640491f0 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h
@@ -16,10 +16,10 @@ class CBC_QRFinderPatternInfo;
class CBC_QRFinderPatternFinder {
private:
- const static int32_t CENTER_QUORUM;
- const static int32_t MIN_SKIP;
- const static int32_t MAX_MODULES;
- const static int32_t INTEGER_MATH_SHIFT;
+ static const int32_t CENTER_QUORUM;
+ static const int32_t MIN_SKIP;
+ static const int32_t MAX_MODULES;
+ static const int32_t INTEGER_MATH_SHIFT;
FX_BOOL m_hasSkipped;
CBC_CommonBitMatrix* m_image;
CFX_Int32Array m_crossCheckStateCount;
diff --git a/xfa/src/fxfa/app/xfa_fftextedit.cpp b/xfa/src/fxfa/app/xfa_fftextedit.cpp
index 5457324d9d..f828939327 100644
--- a/xfa/src/fxfa/app/xfa_fftextedit.cpp
+++ b/xfa/src/fxfa/app/xfa_fftextedit.cpp
@@ -6,6 +6,8 @@
#include "xfa/src/fxfa/app/xfa_fftextedit.h"
+#include <vector>
+
#include "xfa/include/fwl/basewidget/fwl_datetimepicker.h"
#include "xfa/include/fwl/basewidget/fwl_edit.h"
#include "xfa/include/fwl/lightwidget/datetimepicker.h"
diff --git a/xfa/src/fxfa/app/xfa_fftextedit.h b/xfa/src/fxfa/app/xfa_fftextedit.h
index f961e5a4da..a87300dec0 100644
--- a/xfa/src/fxfa/app/xfa_fftextedit.h
+++ b/xfa/src/fxfa/app/xfa_fftextedit.h
@@ -7,6 +7,8 @@
#ifndef XFA_SRC_FXFA_APP_XFA_FFTEXTEDIT_H_
#define XFA_SRC_FXFA_APP_XFA_FFTEXTEDIT_H_
+#include <vector>
+
#include "xfa/src/fxfa/app/xfa_fffield.h"
class CXFA_FFTextEdit : public CXFA_FFField {
diff --git a/xfa/src/fxfa/app/xfa_ffwidget.cpp b/xfa/src/fxfa/app/xfa_ffwidget.cpp
index 7afa6fa12b..cc947b0ad4 100644
--- a/xfa/src/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/app/xfa_ffwidget.cpp
@@ -825,7 +825,8 @@ void XFA_DrawImage(CFX_Graphics* pGS,
}
pRenderDevice->RestoreState();
}
-const static uint8_t g_inv_base64[128] = {
+
+static const uint8_t g_inv_base64[128] = {
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255,
@@ -836,6 +837,7 @@ const static uint8_t g_inv_base64[128] = {
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 255, 255, 255, 255, 255,
};
+
static uint8_t* XFA_RemoveBase64Whitespace(const uint8_t* pStr, int32_t iLen) {
uint8_t* pCP;
int32_t i = 0, j = 0;
diff --git a/xfa/src/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/src/fxfa/app/xfa_ffwidgethandler.cpp
index 62f21fa644..bea7586180 100644
--- a/xfa/src/fxfa/app/xfa_ffwidgethandler.cpp
+++ b/xfa/src/fxfa/app/xfa_ffwidgethandler.cpp
@@ -6,6 +6,8 @@
#include "xfa/src/fxfa/app/xfa_ffwidgethandler.h"
+#include <vector>
+
#include "xfa/src/fxfa/app/xfa_ffchoicelist.h"
#include "xfa/src/fxfa/app/xfa_ffdoc.h"
#include "xfa/src/fxfa/app/xfa_ffdocview.h"