diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-11-21 13:50:32 -0500 |
---|---|---|
committer | dan sinclair <dsinclair@chromium.org> | 2016-11-21 18:51:10 +0000 |
commit | 85c8e7f788512ce5b5b43cd816e8091b57c3d5e7 (patch) | |
tree | e727d747684b9db2632ef250b55046cfce2b55a3 /xfa/fgas | |
parent | 7daa6fb286d1b5d65f99521f3314083e86d93e3f (diff) | |
download | pdfium-85c8e7f788512ce5b5b43cd816e8091b57c3d5e7.tar.xz |
Fixup lint flags.
The -build/include setting was masking out build/include_what_you_use. This CL
restores them, fixes any build errors, and adds NOLINT as needed. As well,
the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd.
lint cleanups
Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f
Reviewed-on: https://pdfium-review.googlesource.com/2030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fgas')
-rw-r--r-- | xfa/fgas/crt/fgas_memory.cpp | 2 | ||||
-rw-r--r-- | xfa/fgas/crt/fgas_utils.h | 12 | ||||
-rw-r--r-- | xfa/fgas/font/cfgas_fontmgr.cpp | 3 | ||||
-rw-r--r-- | xfa/fgas/font/cfgas_fontmgr.h | 1 | ||||
-rw-r--r-- | xfa/fgas/font/fgas_gefont.h | 1 | ||||
-rw-r--r-- | xfa/fgas/layout/fgas_textbreak.h | 4 | ||||
-rw-r--r-- | xfa/fgas/localization/fgas_datetime.h | 4 | ||||
-rw-r--r-- | xfa/fgas/localization/fgas_locale.cpp | 8 | ||||
-rw-r--r-- | xfa/fgas/localization/fgas_locale.h | 16 |
9 files changed, 30 insertions, 21 deletions
diff --git a/xfa/fgas/crt/fgas_memory.cpp b/xfa/fgas/crt/fgas_memory.cpp index 0cccdc75b0..9625f95203 100644 --- a/xfa/fgas/crt/fgas_memory.cpp +++ b/xfa/fgas/crt/fgas_memory.cpp @@ -25,7 +25,7 @@ struct FX_STATICSTORECHUNK { class CFX_StaticStore : public IFX_MemoryAllocator, public CFX_Target { public: - CFX_StaticStore(size_t iDefChunkSize); + explicit CFX_StaticStore(size_t iDefChunkSize); ~CFX_StaticStore() override; void* Alloc(size_t size) override; diff --git a/xfa/fgas/crt/fgas_utils.h b/xfa/fgas/crt/fgas_utils.h index 5565733c26..c7bc45f73d 100644 --- a/xfa/fgas/crt/fgas_utils.h +++ b/xfa/fgas/crt/fgas_utils.h @@ -33,7 +33,7 @@ class CFX_BaseArray : public CFX_Target { template <class baseType> class CFX_BaseArrayTemplate : public CFX_BaseArray { public: - CFX_BaseArrayTemplate(int32_t iGrowSize) + explicit CFX_BaseArrayTemplate(int32_t iGrowSize) : CFX_BaseArray(iGrowSize, sizeof(baseType)) {} CFX_BaseArrayTemplate(int32_t iGrowSize, int32_t iBlockSize) : CFX_BaseArray(iGrowSize, iBlockSize) {} @@ -123,7 +123,7 @@ class CFX_BaseMassArray : public CFX_Target { template <class baseType> class CFX_MassArrayTemplate : public CFX_BaseMassArray { public: - CFX_MassArrayTemplate(int32_t iChunkSize) + explicit CFX_MassArrayTemplate(int32_t iChunkSize) : CFX_BaseMassArray(iChunkSize, sizeof(baseType)) {} CFX_MassArrayTemplate(int32_t iChunkSize, int32_t iBlockSize) : CFX_BaseMassArray(iChunkSize, iBlockSize) {} @@ -171,7 +171,7 @@ class CFX_MassArrayTemplate : public CFX_BaseMassArray { template <class baseType> class CFX_ObjectMassArrayTemplate : public CFX_BaseMassArray { public: - CFX_ObjectMassArrayTemplate(int32_t iChunkSize) + explicit CFX_ObjectMassArrayTemplate(int32_t iChunkSize) : CFX_BaseMassArray(iChunkSize, sizeof(baseType)) {} ~CFX_ObjectMassArrayTemplate() { RemoveAll(false); } @@ -265,7 +265,7 @@ class CFX_BaseDiscreteArray : public CFX_Target { template <class baseType> class CFX_DiscreteArrayTemplate : public CFX_BaseDiscreteArray { public: - CFX_DiscreteArrayTemplate(int32_t iChunkSize) + explicit CFX_DiscreteArrayTemplate(int32_t iChunkSize) : CFX_BaseDiscreteArray(iChunkSize, sizeof(baseType)) {} baseType& GetAt(int32_t index, const baseType& defValue) const { @@ -298,7 +298,7 @@ class CFX_BaseStack : public CFX_Target { template <class baseType> class CFX_StackTemplate : public CFX_BaseStack { public: - CFX_StackTemplate(int32_t iChunkSize) + explicit CFX_StackTemplate(int32_t iChunkSize) : CFX_BaseStack(iChunkSize, sizeof(baseType)) {} int32_t Push(const baseType& element) { @@ -320,7 +320,7 @@ class CFX_StackTemplate : public CFX_BaseStack { template <class baseType> class CFX_ObjectStackTemplate : public CFX_BaseStack { public: - CFX_ObjectStackTemplate(int32_t iChunkSize) + explicit CFX_ObjectStackTemplate(int32_t iChunkSize) : CFX_BaseStack(iChunkSize, sizeof(baseType)) {} ~CFX_ObjectStackTemplate() { RemoveAll(false); } diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp index e42d2a5179..1830850ce6 100644 --- a/xfa/fgas/font/cfgas_fontmgr.cpp +++ b/xfa/fgas/font/cfgas_fontmgr.cpp @@ -6,6 +6,9 @@ #include "xfa/fgas/font/cfgas_fontmgr.h" +#include <memory> +#include <utility> + #include "core/fxcrt/fx_stream.h" #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/cfx_fontmgr.h" diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h index f571365b88..7b68525188 100644 --- a/xfa/fgas/font/cfgas_fontmgr.h +++ b/xfa/fgas/font/cfgas_fontmgr.h @@ -7,6 +7,7 @@ #ifndef XFA_FGAS_FONT_CFGAS_FONTMGR_H_ #define XFA_FGAS_FONT_CFGAS_FONTMGR_H_ +#include <memory> #include <vector> #include "core/fxcrt/fx_ext.h" diff --git a/xfa/fgas/font/fgas_gefont.h b/xfa/fgas/font/fgas_gefont.h index 7baafefc7e..afe628fc66 100644 --- a/xfa/fgas/font/fgas_gefont.h +++ b/xfa/fgas/font/fgas_gefont.h @@ -8,6 +8,7 @@ #define XFA_FGAS_FONT_FGAS_GEFONT_H_ #include <map> +#include <memory> #include "core/fxcrt/fx_memory.h" #include "xfa/fgas/crt/fgas_utils.h" diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h index 4e9238f7bf..7bae6cd46e 100644 --- a/xfa/fgas/layout/fgas_textbreak.h +++ b/xfa/fgas/layout/fgas_textbreak.h @@ -160,7 +160,7 @@ typedef CFX_BaseArrayTemplate<CFX_TxtPiece> CFX_TxtPieceArray; class CFX_TxtLine { public: - CFX_TxtLine(int32_t iBlockSize); + explicit CFX_TxtLine(int32_t iBlockSize); ~CFX_TxtLine(); int32_t CountChars() const { return m_pLineChars->GetSize(); } @@ -199,7 +199,7 @@ class CFX_TxtLine { class CFX_TxtBreak { public: - CFX_TxtBreak(uint32_t dwPolicies); + explicit CFX_TxtBreak(uint32_t dwPolicies); ~CFX_TxtBreak(); void SetLineWidth(FX_FLOAT fLineWidth); diff --git a/xfa/fgas/localization/fgas_datetime.h b/xfa/fgas/localization/fgas_datetime.h index 3383d45669..d3ea9fa4a6 100644 --- a/xfa/fgas/localization/fgas_datetime.h +++ b/xfa/fgas/localization/fgas_datetime.h @@ -30,7 +30,7 @@ uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth); class CFX_Unitime { public: CFX_Unitime() { m_iUnitime = 0; } - CFX_Unitime(FX_UNITIME iUnitime) { m_iUnitime = iUnitime; } + explicit CFX_Unitime(FX_UNITIME iUnitime) { m_iUnitime = iUnitime; } CFX_Unitime(const CFX_Unitime& unitime) { m_iUnitime = unitime.m_iUnitime; } operator FX_UNITIME*() { return &m_iUnitime; } operator FX_UNITIME const*() const { return &m_iUnitime; } @@ -212,7 +212,7 @@ struct FX_DATETIME { class CFX_DateTime { public: CFX_DateTime() {} - CFX_DateTime(const FX_DATETIME& dt) { m_DateTime = dt; } + explicit CFX_DateTime(const FX_DATETIME& dt) { m_DateTime = dt; } CFX_DateTime(const CFX_DateTime& dt) { m_DateTime = dt.m_DateTime; } virtual ~CFX_DateTime() {} operator FX_DATETIME*() { return &m_DateTime; } diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp index 68fd94e29f..aea7bacc11 100644 --- a/xfa/fgas/localization/fgas_locale.cpp +++ b/xfa/fgas/localization/fgas_locale.cpp @@ -4,6 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "xfa/fgas/localization/fgas_locale.h" + #include <algorithm> #include "core/fxcrt/fx_ext.h" @@ -92,9 +94,9 @@ class CFX_LCNumeric { CFX_LCNumeric(int64_t integral, uint32_t fractional = 0, int32_t exponent = 0); - CFX_LCNumeric(FX_FLOAT dbRetValue); - CFX_LCNumeric(double dbvalue); - CFX_LCNumeric(CFX_WideString& wsNumeric); + explicit CFX_LCNumeric(FX_FLOAT dbRetValue); + explicit CFX_LCNumeric(double dbvalue); + explicit CFX_LCNumeric(CFX_WideString& wsNumeric); FX_FLOAT GetFloat() const; double GetDouble() const; diff --git a/xfa/fgas/localization/fgas_locale.h b/xfa/fgas/localization/fgas_locale.h index a3272b455f..f15766d2dd 100644 --- a/xfa/fgas/localization/fgas_locale.h +++ b/xfa/fgas/localization/fgas_locale.h @@ -7,6 +7,8 @@ #ifndef XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ #define XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ +#include <memory> + #include "core/fxcrt/fx_xml.h" #include "xfa/fgas/localization/fgas_datetime.h" @@ -97,13 +99,13 @@ bool FX_TimeFromCanonical(const CFX_WideStringC& wsTime, class CFX_Decimal { public: CFX_Decimal(); - CFX_Decimal(uint32_t val); - CFX_Decimal(uint64_t val); - CFX_Decimal(int32_t val); - CFX_Decimal(int64_t val); - CFX_Decimal(FX_FLOAT val, uint8_t scale = 3); - CFX_Decimal(const CFX_WideStringC& str); - CFX_Decimal(const CFX_ByteStringC& str); + explicit CFX_Decimal(uint32_t val); + explicit CFX_Decimal(uint64_t val); + explicit CFX_Decimal(int32_t val); + explicit CFX_Decimal(int64_t val); + explicit CFX_Decimal(FX_FLOAT val, uint8_t scale = 3); + explicit CFX_Decimal(const CFX_WideStringC& str); + explicit CFX_Decimal(const CFX_ByteStringC& str); operator CFX_WideString() const; operator double() const; bool operator==(const CFX_Decimal& val) const; |