diff options
212 files changed, 398 insertions, 92 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 0f93697987..5ad2f545ae 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -12,19 +12,13 @@ LINT_FILTERS = [ # Rvalue ref checks are unreliable. '-build/c++11', # Need to fix header names not matching cpp names. - '-build/include', - # Need to fix header names not matching cpp names. '-build/include_order', # Too many to fix at the moment. '-readability/casting', # Need to refactor large methods to fix. '-readability/fn_size', - # Need to fix errors when making methods explicit. - '-runtime/explicit', # Lots of usage to fix first. '-runtime/int', - # Need to fix two snprintf TODOs - '-runtime/printf', # Lots of non-const references need to be fixed '-runtime/references', # We are not thread safe, so this will never pass. diff --git a/core/fpdfapi/cpdf_modulemgr.h b/core/fpdfapi/cpdf_modulemgr.h index bc54a9b2fb..57c266619e 100644 --- a/core/fpdfapi/cpdf_modulemgr.h +++ b/core/fpdfapi/cpdf_modulemgr.h @@ -8,6 +8,7 @@ #define CORE_FPDFAPI_CPDF_MODULEMGR_H_ #include <memory> +#include <utility> #include "core/fxcrt/fx_basic.h" diff --git a/core/fpdfapi/font/fpdf_font.cpp b/core/fpdfapi/font/fpdf_font.cpp index b681edf70b..bf1fac4518 100644 --- a/core/fpdfapi/font/fpdf_font.cpp +++ b/core/fpdfapi/font/fpdf_font.cpp @@ -6,6 +6,9 @@ #include "core/fpdfapi/font/font_int.h" +#include <memory> +#include <utility> + #include "core/fpdfapi/cpdf_modulemgr.h" #include "core/fpdfapi/page/cpdf_form.h" #include "core/fpdfapi/page/cpdf_pagemodule.h" diff --git a/core/fpdfapi/page/cpdf_contentmark.cpp b/core/fpdfapi/page/cpdf_contentmark.cpp index a867409335..07f0bd931d 100644 --- a/core/fpdfapi/page/cpdf_contentmark.cpp +++ b/core/fpdfapi/page/cpdf_contentmark.cpp @@ -6,6 +6,9 @@ #include "core/fpdfapi/page/cpdf_contentmark.h" +#include <memory> +#include <utility> + #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "third_party/base/stl_util.h" diff --git a/core/fpdfapi/page/cpdf_contentmarkitem.cpp b/core/fpdfapi/page/cpdf_contentmarkitem.cpp index 48a9679251..2c370141e2 100644 --- a/core/fpdfapi/page/cpdf_contentmarkitem.cpp +++ b/core/fpdfapi/page/cpdf_contentmarkitem.cpp @@ -6,6 +6,8 @@ #include "core/fpdfapi/page/cpdf_contentmarkitem.h" +#include <utility> + #include "core/fpdfapi/parser/cpdf_dictionary.h" CPDF_ContentMarkItem::CPDF_ContentMarkItem() diff --git a/core/fpdfapi/page/cpdf_page.cpp b/core/fpdfapi/page/cpdf_page.cpp index 2143ddb015..a29d9713dd 100644 --- a/core/fpdfapi/page/cpdf_page.cpp +++ b/core/fpdfapi/page/cpdf_page.cpp @@ -7,6 +7,7 @@ #include "core/fpdfapi/page/cpdf_page.h" #include <set> +#include <utility> #include "core/fpdfapi/cpdf_pagerendercontext.h" #include "core/fpdfapi/page/cpdf_pageobject.h" diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp index a52d97f27e..9726fa216f 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp +++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp @@ -6,6 +6,8 @@ #include "core/fpdfapi/page/cpdf_pageobjectholder.h" +#include <algorithm> + #include "core/fpdfapi/page/cpdf_pageobject.h" #include "core/fpdfapi/page/pageint.h" #include "core/fpdfapi/parser/cpdf_dictionary.h" diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h index ce5424e009..aee7617c1f 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.h +++ b/core/fpdfapi/page/cpdf_pageobjectholder.h @@ -7,6 +7,8 @@ #ifndef CORE_FPDFAPI_PAGE_CPDF_PAGEOBJECTHOLDER_H_ #define CORE_FPDFAPI_PAGE_CPDF_PAGEOBJECTHOLDER_H_ +#include <memory> + #include "core/fpdfapi/page/cpdf_pageobjectlist.h" #include "core/fxcrt/fx_coordinates.h" #include "core/fxcrt/fx_system.h" diff --git a/core/fpdfapi/page/cpdf_shadingpattern.cpp b/core/fpdfapi/page/cpdf_shadingpattern.cpp index 3b0b439a31..e19ffaf0c4 100644 --- a/core/fpdfapi/page/cpdf_shadingpattern.cpp +++ b/core/fpdfapi/page/cpdf_shadingpattern.cpp @@ -6,6 +6,8 @@ #include "core/fpdfapi/page/cpdf_shadingpattern.h" +#include <algorithm> + #include "core/fpdfapi/page/cpdf_docpagedata.h" #include "core/fpdfapi/page/pageint.h" #include "core/fpdfapi/parser/cpdf_array.h" diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp index 0973cb6bc6..64010e19e8 100644 --- a/core/fpdfapi/parser/cpdf_array.cpp +++ b/core/fpdfapi/parser/cpdf_array.cpp @@ -7,6 +7,7 @@ #include "core/fpdfapi/parser/cpdf_array.h" #include <set> +#include <utility> #include "core/fpdfapi/parser/cpdf_name.h" #include "core/fpdfapi/parser/cpdf_number.h" diff --git a/core/fpdfapi/parser/cpdf_array_unittest.cpp b/core/fpdfapi/parser/cpdf_array_unittest.cpp index 866e961351..46777289b5 100644 --- a/core/fpdfapi/parser/cpdf_array_unittest.cpp +++ b/core/fpdfapi/parser/cpdf_array_unittest.cpp @@ -5,6 +5,7 @@ #include "core/fpdfapi/parser/cpdf_array.h" #include <memory> +#include <utility> #include "core/fpdfapi/parser/cpdf_number.h" #include "core/fpdfapi/parser/cpdf_reference.h" diff --git a/core/fpdfapi/parser/cpdf_boolean.h b/core/fpdfapi/parser/cpdf_boolean.h index 808f9ee6f0..afebc29448 100644 --- a/core/fpdfapi/parser/cpdf_boolean.h +++ b/core/fpdfapi/parser/cpdf_boolean.h @@ -7,6 +7,8 @@ #ifndef CORE_FPDFAPI_PARSER_CPDF_BOOLEAN_H_ #define CORE_FPDFAPI_PARSER_CPDF_BOOLEAN_H_ +#include <memory> + #include "core/fpdfapi/parser/cpdf_object.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" diff --git a/core/fpdfapi/parser/cpdf_data_avail.h b/core/fpdfapi/parser/cpdf_data_avail.h index 0f10ceb6fc..809b23fe59 100644 --- a/core/fpdfapi/parser/cpdf_data_avail.h +++ b/core/fpdfapi/parser/cpdf_data_avail.h @@ -7,6 +7,8 @@ #ifndef CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ #define CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ +#include <memory> +#include <set> #include <vector> #include "core/fpdfapi/parser/cpdf_parser.h" diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h index 1fd13a1c8e..59154d3ab3 100644 --- a/core/fpdfapi/parser/cpdf_document.h +++ b/core/fpdfapi/parser/cpdf_document.h @@ -9,6 +9,9 @@ #include <functional> #include <memory> +#include <set> +#include <utility> +#include <vector> #include "core/fpdfapi/parser/cpdf_indirect_object_holder.h" #include "core/fpdfapi/parser/cpdf_object.h" diff --git a/core/fpdfapi/parser/cpdf_indirect_object_holder.cpp b/core/fpdfapi/parser/cpdf_indirect_object_holder.cpp index d1183ebaf4..efb9f84059 100644 --- a/core/fpdfapi/parser/cpdf_indirect_object_holder.cpp +++ b/core/fpdfapi/parser/cpdf_indirect_object_holder.cpp @@ -6,6 +6,9 @@ #include "core/fpdfapi/parser/cpdf_indirect_object_holder.h" +#include <algorithm> +#include <utility> + #include "core/fpdfapi/parser/cpdf_object.h" #include "core/fpdfapi/parser/cpdf_parser.h" diff --git a/core/fpdfapi/parser/cpdf_linearized_header.cpp b/core/fpdfapi/parser/cpdf_linearized_header.cpp index 9ecc051f8a..a56d64f259 100644 --- a/core/fpdfapi/parser/cpdf_linearized_header.cpp +++ b/core/fpdfapi/parser/cpdf_linearized_header.cpp @@ -6,6 +6,9 @@ #include "core/fpdfapi/parser/cpdf_linearized_header.h" +#include <algorithm> +#include <utility> + #include "core/fpdfapi/parser/cpdf_array.h" #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_number.h" diff --git a/core/fpdfapi/parser/cpdf_name.h b/core/fpdfapi/parser/cpdf_name.h index 6aac24ed88..61318d4afb 100644 --- a/core/fpdfapi/parser/cpdf_name.h +++ b/core/fpdfapi/parser/cpdf_name.h @@ -7,6 +7,8 @@ #ifndef CORE_FPDFAPI_PARSER_CPDF_NAME_H_ #define CORE_FPDFAPI_PARSER_CPDF_NAME_H_ +#include <memory> + #include "core/fpdfapi/parser/cpdf_object.h" #include "core/fxcrt/cfx_string_pool_template.h" #include "core/fxcrt/cfx_weak_ptr.h" diff --git a/core/fpdfapi/parser/cpdf_null.h b/core/fpdfapi/parser/cpdf_null.h index df985b92c0..4f8420f29d 100644 --- a/core/fpdfapi/parser/cpdf_null.h +++ b/core/fpdfapi/parser/cpdf_null.h @@ -7,6 +7,8 @@ #ifndef CORE_FPDFAPI_PARSER_CPDF_NULL_H_ #define CORE_FPDFAPI_PARSER_CPDF_NULL_H_ +#include <memory> + #include "core/fpdfapi/parser/cpdf_object.h" class CPDF_Null : public CPDF_Object { diff --git a/core/fpdfapi/parser/cpdf_number.h b/core/fpdfapi/parser/cpdf_number.h index 0a8f187244..85a78e5f1a 100644 --- a/core/fpdfapi/parser/cpdf_number.h +++ b/core/fpdfapi/parser/cpdf_number.h @@ -7,6 +7,8 @@ #ifndef CORE_FPDFAPI_PARSER_CPDF_NUMBER_H_ #define CORE_FPDFAPI_PARSER_CPDF_NUMBER_H_ +#include <memory> + #include "core/fpdfapi/parser/cpdf_object.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" diff --git a/core/fpdfapi/parser/cpdf_reference.h b/core/fpdfapi/parser/cpdf_reference.h index 93bab00334..5597142b95 100644 --- a/core/fpdfapi/parser/cpdf_reference.h +++ b/core/fpdfapi/parser/cpdf_reference.h @@ -7,6 +7,7 @@ #ifndef CORE_FPDFAPI_PARSER_CPDF_REFERENCE_H_ #define CORE_FPDFAPI_PARSER_CPDF_REFERENCE_H_ +#include <memory> #include <set> #include "core/fpdfapi/parser/cpdf_object.h" diff --git a/core/fpdfapi/parser/cpdf_simple_parser.h b/core/fpdfapi/parser/cpdf_simple_parser.h index c638b8a04b..0ff6985660 100644 --- a/core/fpdfapi/parser/cpdf_simple_parser.h +++ b/core/fpdfapi/parser/cpdf_simple_parser.h @@ -13,7 +13,7 @@ class CPDF_SimpleParser { public: CPDF_SimpleParser(const uint8_t* pData, uint32_t dwSize); - CPDF_SimpleParser(const CFX_ByteStringC& str); + explicit CPDF_SimpleParser(const CFX_ByteStringC& str); CFX_ByteStringC GetWord(); diff --git a/core/fpdfdoc/cpdf_apsettings.cpp b/core/fpdfdoc/cpdf_apsettings.cpp index f9127a2720..9fc9c1aa06 100644 --- a/core/fpdfdoc/cpdf_apsettings.cpp +++ b/core/fpdfdoc/cpdf_apsettings.cpp @@ -6,6 +6,8 @@ #include "core/fpdfdoc/cpdf_apsettings.h" +#include <algorithm> + #include "core/fpdfapi/parser/cpdf_array.h" #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfdoc/cpdf_formcontrol.h" diff --git a/core/fpdfdoc/cpdf_bookmark.cpp b/core/fpdfdoc/cpdf_bookmark.cpp index 303f0fcce3..c2c3705717 100644 --- a/core/fpdfdoc/cpdf_bookmark.cpp +++ b/core/fpdfdoc/cpdf_bookmark.cpp @@ -6,6 +6,8 @@ #include "core/fpdfdoc/cpdf_bookmark.h" +#include <memory> + #include "core/fpdfapi/parser/cpdf_array.h" #include "core/fpdfapi/parser/cpdf_string.h" #include "core/fpdfdoc/cpdf_nametree.h" diff --git a/core/fpdfdoc/cpdf_defaultappearance.cpp b/core/fpdfdoc/cpdf_defaultappearance.cpp index 130115bdfb..daf93414bf 100644 --- a/core/fpdfdoc/cpdf_defaultappearance.cpp +++ b/core/fpdfdoc/cpdf_defaultappearance.cpp @@ -6,6 +6,8 @@ #include "core/fpdfdoc/cpdf_defaultappearance.h" +#include <algorithm> + #include "core/fpdfapi/parser/cpdf_simple_parser.h" #include "core/fpdfapi/parser/fpdf_parser_decode.h" #include "core/fpdfdoc/cpdf_formcontrol.h" diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index 377a360d9e..00365c7224 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -364,6 +364,7 @@ bool RetrieveSpecificFont(uint8_t charSet, lf.lfPitchAndFamily = pitchAndFamily; if (pcsFontName) { // TODO(dsinclair): Should this be strncpy? + // NOLINTNEXTLINE(runtime/printf) strcpy(lf.lfFaceName, pcsFontName); } return RetrieveSpecificFont(lf); diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp index 5fe8c0137e..5cc7e9bf11 100644 --- a/core/fpdfdoc/cpdf_variabletext.cpp +++ b/core/fpdfdoc/cpdf_variabletext.cpp @@ -6,6 +6,8 @@ #include "core/fpdfdoc/cpdf_variabletext.h" +#include <algorithm> + #include "core/fpdfapi/font/cpdf_font.h" #include "core/fpdfdoc/cline.h" #include "core/fpdfdoc/cpvt_section.h" diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp index 3d3fe74eb1..8d20894231 100644 --- a/core/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/fxcodec/codec/fx_codec_jbig.cpp @@ -7,6 +7,7 @@ #include "core/fxcodec/codec/ccodec_jbig2module.h" #include <list> +#include <memory> #include "core/fpdfapi/parser/cpdf_stream_acc.h" #include "core/fxcodec/JBig2_DocumentContext.h" diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index 775ebfb9c6..873b52a81c 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -6,6 +6,8 @@ #include <setjmp.h> +#include <memory> + #include "core/fxcodec/codec/codec_int.h" #include "core/fxcodec/fx_codec.h" #include "core/fxcrt/fx_safe_types.h" diff --git a/core/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/fxcodec/codec/fx_codec_jpx_opj.cpp index bb46da4d26..fa163567f4 100644 --- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp +++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp @@ -6,6 +6,7 @@ #include <algorithm> #include <limits> +#include <memory> #include <vector> #include "core/fpdfapi/page/cpdf_colorspace.h" diff --git a/core/fxcrt/cfx_shared_copy_on_write.h b/core/fxcrt/cfx_shared_copy_on_write.h index cd6cf6adc5..c87d96509d 100644 --- a/core/fxcrt/cfx_shared_copy_on_write.h +++ b/core/fxcrt/cfx_shared_copy_on_write.h @@ -56,6 +56,7 @@ class CFX_SharedCopyOnWrite { class CountedObj : public ObjClass { public: template <typename... Args> + // NOLINTNEXTLINE(runtime/explicit) CountedObj(Args... params) : ObjClass(params...), m_RefCount(0) {} CountedObj(const CountedObj& src) : ObjClass(src), m_RefCount(0) {} diff --git a/core/fxcrt/cfx_string_c_template.h b/core/fxcrt/cfx_string_c_template.h index 4a3dae7e7e..3bfcc915fb 100644 --- a/core/fxcrt/cfx_string_c_template.h +++ b/core/fxcrt/cfx_string_c_template.h @@ -24,6 +24,7 @@ class CFX_StringCTemplate { CFX_StringCTemplate() : m_Ptr(nullptr), m_Length(0) {} // Deliberately implicit to avoid calling on every string literal. + // NOLINTNEXTLINE(runtime/explicit) CFX_StringCTemplate(const CharType* ptr) : m_Ptr(reinterpret_cast<const UnsignedType*>(ptr)), m_Length(ptr ? FXSYS_len(ptr) : 0) {} @@ -41,6 +42,7 @@ class CFX_StringCTemplate { // Deliberately implicit to avoid calling on every string literal. // |ch| must be an lvalue that outlives the the CFX_StringCTemplate. + // NOLINTNEXTLINE(runtime/explicit) CFX_StringCTemplate(CharType& ch) { m_Ptr = reinterpret_cast<const UnsignedType*>(&ch); m_Length = 1; diff --git a/core/fxcrt/cfx_weak_ptr.h b/core/fxcrt/cfx_weak_ptr.h index f679696992..43ae5b881d 100644 --- a/core/fxcrt/cfx_weak_ptr.h +++ b/core/fxcrt/cfx_weak_ptr.h @@ -9,6 +9,7 @@ #include <cstddef> #include <memory> +#include <utility> #include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/fx_system.h" @@ -19,10 +20,11 @@ class CFX_WeakPtr { CFX_WeakPtr() {} CFX_WeakPtr(const CFX_WeakPtr& that) : m_pHandle(that.m_pHandle) {} CFX_WeakPtr(CFX_WeakPtr&& that) { Swap(that); } - CFX_WeakPtr(std::unique_ptr<T, D> pObj) + explicit CFX_WeakPtr(std::unique_ptr<T, D> pObj) : m_pHandle(new Handle(std::move(pObj))) {} // Deliberately implicit to allow passing nullptr. + // NOLINTNEXTLINE(runtime/explicit) CFX_WeakPtr(std::nullptr_t arg) {} explicit operator bool() const { return m_pHandle && !!m_pHandle->Get(); } diff --git a/core/fxcrt/fx_basic.h b/core/fxcrt/fx_basic.h index 9c8b4e146e..9034398983 100644 --- a/core/fxcrt/fx_basic.h +++ b/core/fxcrt/fx_basic.h @@ -455,7 +455,7 @@ class CFX_MapPtrToPtr { }; public: - CFX_MapPtrToPtr(int nBlockSize = 10); + explicit CFX_MapPtrToPtr(int nBlockSize = 10); ~CFX_MapPtrToPtr(); int GetCount() const { return m_nCount; } @@ -554,7 +554,7 @@ class CFX_PtrList { }; public: - CFX_PtrList(int nBlockSize = 10); + explicit CFX_PtrList(int nBlockSize = 10); FX_POSITION GetHeadPosition() const { return (FX_POSITION)m_pNodeHead; } FX_POSITION GetTailPosition() const { return (FX_POSITION)m_pNodeTail; } diff --git a/core/fxcrt/fx_basic_bstring_unittest.cpp b/core/fxcrt/fx_basic_bstring_unittest.cpp index f314c652ba..503e68458a 100644 --- a/core/fxcrt/fx_basic_bstring_unittest.cpp +++ b/core/fxcrt/fx_basic_bstring_unittest.cpp @@ -649,6 +649,7 @@ TEST(fxcrt, ByteStringGetBuffer) { { CFX_ByteString str; FX_CHAR* buffer = str.GetBuffer(12); + // NOLINTNEXTLINE(runtime/printf) strcpy(buffer, "clams"); str.ReleaseBuffer(); EXPECT_EQ("clams", str); @@ -656,6 +657,7 @@ TEST(fxcrt, ByteStringGetBuffer) { { CFX_ByteString str("cl"); FX_CHAR* buffer = str.GetBuffer(12); + // NOLINTNEXTLINE(runtime/printf) strcpy(buffer + 2, "ams"); str.ReleaseBuffer(); EXPECT_EQ("clams", str); diff --git a/core/fxcrt/fx_ext.h b/core/fxcrt/fx_ext.h index b7fd6f67f7..7d8529e333 100644 --- a/core/fxcrt/fx_ext.h +++ b/core/fxcrt/fx_ext.h @@ -9,6 +9,7 @@ #include <cctype> #include <cwctype> +#include <memory> #include "core/fxcrt/fx_basic.h" diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp index 0a378f32e5..39bf028205 100644 --- a/core/fxcrt/fx_extension.cpp +++ b/core/fxcrt/fx_extension.cpp @@ -6,6 +6,8 @@ #include "core/fxcrt/extension.h" +#include <algorithm> +#include <memory> #include <utility> #include "core/fxcrt/fx_basic.h" diff --git a/core/fxcrt/fx_string.h b/core/fxcrt/fx_string.h index 0b6d8064d4..540c0c4330 100644 --- a/core/fxcrt/fx_string.h +++ b/core/fxcrt/fx_string.h @@ -41,7 +41,9 @@ class CFX_ByteString { CFX_ByteString(CFX_ByteString&& other); // Deliberately implicit to avoid calling on every string literal. + // NOLINTNEXTLINE(runtime/explicit) CFX_ByteString(char ch); + // NOLINTNEXTLINE(runtime/explicit) CFX_ByteString(const FX_CHAR* ptr); CFX_ByteString(const FX_CHAR* ptr, FX_STRSIZE len); @@ -242,7 +244,9 @@ class CFX_WideString { CFX_WideString(CFX_WideString&& other); // Deliberately implicit to avoid calling on every string literal. + // NOLINTNEXTLINE(runtime/explicit) CFX_WideString(FX_WCHAR ch); + // NOLINTNEXTLINE(runtime/explicit) CFX_WideString(const FX_WCHAR* ptr); CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len); diff --git a/core/fxcrt/fx_xml.h b/core/fxcrt/fx_xml.h index 6c6e6178af..a7375b9e90 100644 --- a/core/fxcrt/fx_xml.h +++ b/core/fxcrt/fx_xml.h @@ -66,7 +66,7 @@ class CXML_Element { FX_FILESIZE* pParsedSize = nullptr); CXML_Element(const CFX_ByteStringC& qSpace, const CFX_ByteStringC& tagName); - CXML_Element(const CFX_ByteStringC& qTagName); + explicit CXML_Element(const CFX_ByteStringC& qTagName); CXML_Element(); ~CXML_Element(); diff --git a/core/fxcrt/fx_xml_parser.cpp b/core/fxcrt/fx_xml_parser.cpp index e1a209a701..3391086e90 100644 --- a/core/fxcrt/fx_xml_parser.cpp +++ b/core/fxcrt/fx_xml_parser.cpp @@ -6,6 +6,7 @@ #include "core/fxcrt/xml_int.h" +#include <algorithm> #include <vector> #include "core/fxcrt/fx_ext.h" diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp index 3634d96d91..e341e8c045 100644 --- a/core/fxge/agg/fx_agg_driver.cpp +++ b/core/fxge/agg/fx_agg_driver.cpp @@ -7,6 +7,7 @@ #include "core/fxge/agg/fx_agg_driver.h" #include <algorithm> +#include <utility> #include "core/fxcodec/fx_codec.h" #include "core/fxcrt/fx_memory.h" diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp index 7c3cb04105..c05aea34f5 100644 --- a/core/fxge/apple/fx_mac_imp.cpp +++ b/core/fxge/apple/fx_mac_imp.cpp @@ -4,6 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include <memory> + #include "core/fxge/apple/apple_int.h" #include "core/fxge/cfx_gemodule.h" #include "core/fxge/ge/cfx_folderfontinfo.h" diff --git a/core/fxge/cfx_facecache.h b/core/fxge/cfx_facecache.h index 60528ba6a5..44ed0b287a 100644 --- a/core/fxge/cfx_facecache.h +++ b/core/fxge/cfx_facecache.h @@ -8,6 +8,7 @@ #define CORE_FXGE_CFX_FACECACHE_H_ #include <map> +#include <memory> #include "core/fxge/fx_font.h" #include "core/fxge/fx_freetype.h" diff --git a/core/fxge/cfx_fontmapper.h b/core/fxge/cfx_fontmapper.h index fa3bc02eb0..96630a77df 100644 --- a/core/fxge/cfx_fontmapper.h +++ b/core/fxge/cfx_fontmapper.h @@ -8,6 +8,7 @@ #define CORE_FXGE_CFX_FONTMAPPER_H_ #include <memory> +#include <utility> #include <vector> #include "core/fxge/cfx_fontmgr.h" diff --git a/core/fxge/dib/fx_dib_convert.cpp b/core/fxge/dib/fx_dib_convert.cpp index 5eac2ac8e4..f5ae563d57 100644 --- a/core/fxge/dib/fx_dib_convert.cpp +++ b/core/fxge/dib/fx_dib_convert.cpp @@ -4,6 +4,9 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include <memory> +#include <utility> + #include "core/fxcodec/fx_codec.h" #include "core/fxge/fx_dib.h" diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp index 9c91c74366..63db7adb91 100644 --- a/core/fxge/dib/fx_dib_main.cpp +++ b/core/fxge/dib/fx_dib_main.cpp @@ -7,7 +7,10 @@ #include "core/fxge/fx_dib.h" #include <limits.h> + #include <algorithm> +#include <memory> +#include <utility> #include "core/fxcodec/fx_codec.h" #include "core/fxge/cfx_gemodule.h" diff --git a/core/fxge/dib/fx_dib_transform.cpp b/core/fxge/dib/fx_dib_transform.cpp index e2b95237d5..b938d648a8 100644 --- a/core/fxge/dib/fx_dib_transform.cpp +++ b/core/fxge/dib/fx_dib_transform.cpp @@ -6,6 +6,9 @@ #include "core/fxge/dib/dib_int.h" +#include <memory> +#include <utility> + #include "core/fxge/fx_dib.h" #include "third_party/base/ptr_util.h" diff --git a/core/fxge/fx_font.h b/core/fxge/fx_font.h index c0d204199c..6bb4bdea34 100644 --- a/core/fxge/fx_font.h +++ b/core/fxge/fx_font.h @@ -8,6 +8,7 @@ #define CORE_FXGE_FX_FONT_H_ #include <memory> +#include <utility> #include <vector> #include "core/fxcrt/fx_system.h" @@ -169,6 +170,7 @@ class CFX_Font { static const uint8_t s_WeightPow_SHIFTJIS[kWeightPowArraySize]; #ifdef PDF_ENABLE_XFA + protected: CFX_BinaryBuf m_OtfFontData; bool m_bShallowCopy; diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp index 942814b75a..cbaa07e449 100644 --- a/core/fxge/ge/cfx_facecache.cpp +++ b/core/fxge/ge/cfx_facecache.cpp @@ -7,6 +7,8 @@ #include "core/fxge/cfx_facecache.h" #include <algorithm> +#include <limits> +#include <memory> #include "core/fxge/cfx_fontmgr.h" #include "core/fxge/cfx_gemodule.h" diff --git a/core/fxge/ge/cfx_folderfontinfo.cpp b/core/fxge/ge/cfx_folderfontinfo.cpp index 9ccccbc635..776a37319b 100644 --- a/core/fxge/ge/cfx_folderfontinfo.cpp +++ b/core/fxge/ge/cfx_folderfontinfo.cpp @@ -6,6 +6,8 @@ #include "core/fxge/ge/cfx_folderfontinfo.h" +#include <limits> + #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/fx_font.h" diff --git a/core/fxge/ge/cfx_font.cpp b/core/fxge/ge/cfx_font.cpp index b778031606..b85709040b 100644 --- a/core/fxge/ge/cfx_font.cpp +++ b/core/fxge/ge/cfx_font.cpp @@ -6,6 +6,12 @@ #include "core/fxge/fx_font.h" +#include <algorithm> +#include <limits> +#include <memory> +#include <utility> +#include <vector> + #include "core/fpdfapi/font/cpdf_font.h" #include "core/fxge/cfx_facecache.h" #include "core/fxge/cfx_fontcache.h" diff --git a/core/fxge/ge/cfx_fontcache.cpp b/core/fxge/ge/cfx_fontcache.cpp index 2a4d243719..58cee06d42 100644 --- a/core/fxge/ge/cfx_fontcache.cpp +++ b/core/fxge/ge/cfx_fontcache.cpp @@ -6,6 +6,9 @@ #include "core/fxge/cfx_fontcache.h" +#include <memory> +#include <utility> + #include "core/fxge/cfx_facecache.h" #include "core/fxge/fx_font.h" #include "core/fxge/fx_freetype.h" diff --git a/core/fxge/ge/cfx_fontmgr.cpp b/core/fxge/ge/cfx_fontmgr.cpp index 1d1ebca4a4..64f647e3f6 100644 --- a/core/fxge/ge/cfx_fontmgr.cpp +++ b/core/fxge/ge/cfx_fontmgr.cpp @@ -6,6 +6,9 @@ #include "core/fxge/cfx_fontmgr.h" +#include <memory> +#include <utility> + #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/cfx_substfont.h" #include "core/fxge/fontdata/chromefontdata/chromefontdata.h" diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp index a4ce6b7d5e..10135273c6 100644 --- a/core/fxge/ge/cfx_renderdevice.cpp +++ b/core/fxge/ge/cfx_renderdevice.cpp @@ -6,6 +6,11 @@ #include "core/fxge/cfx_renderdevice.h" +#include <algorithm> +#include <memory> +#include <utility> +#include <vector> + #include "core/fxcrt/fx_safe_types.h" #include "core/fxge/cfx_facecache.h" #include "core/fxge/cfx_fxgedevice.h" diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp index f8c36d8f07..7ac4fada5c 100644 --- a/core/fxge/ge/fx_ge_fontmap.cpp +++ b/core/fxge/ge/fx_ge_fontmap.cpp @@ -4,6 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include <memory> + #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/ifx_systemfontinfo.h" diff --git a/core/fxge/ifx_systemfontinfo.h b/core/fxge/ifx_systemfontinfo.h index 640a11a57b..1ab0ab677c 100644 --- a/core/fxge/ifx_systemfontinfo.h +++ b/core/fxge/ifx_systemfontinfo.h @@ -7,6 +7,8 @@ #ifndef CORE_FXGE_IFX_SYSTEMFONTINFO_H_ #define CORE_FXGE_IFX_SYSTEMFONTINFO_H_ +#include <memory> + #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/fx_font.h" diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index d525c470af..973c4f2b34 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -3,6 +3,7 @@ // found in the LICENSE file. #include <algorithm> +#include <utility> #include <vector> #include "core/fxcodec/fx_codec.h" diff --git a/core/fxge/skia/fx_skia_device.h b/core/fxge/skia/fx_skia_device.h index bbbbdaa2dd..f2576a888d 100644 --- a/core/fxge/skia/fx_skia_device.h +++ b/core/fxge/skia/fx_skia_device.h @@ -7,6 +7,9 @@ #if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_ +#include <memory> +#include <vector> + #include "core/fxge/cfx_pathdata.h" #include "core/fxge/ifx_renderdevicedriver.h" diff --git a/fpdfsdk/cba_annotiterator.cpp b/fpdfsdk/cba_annotiterator.cpp index a447034cda..cc842babee 100644 --- a/fpdfsdk/cba_annotiterator.cpp +++ b/fpdfsdk/cba_annotiterator.cpp @@ -6,6 +6,8 @@ #include "fpdfsdk/cba_annotiterator.h" +#include <algorithm> + #include "core/fpdfapi/page/cpdf_page.h" #include "fpdfsdk/cpdfsdk_annot.h" #include "fpdfsdk/cpdfsdk_pageview.h" diff --git a/fpdfsdk/cpdfsdk_datetime.h b/fpdfsdk/cpdfsdk_datetime.h index 70c6e0aee3..6b612b27bc 100644 --- a/fpdfsdk/cpdfsdk_datetime.h +++ b/fpdfsdk/cpdfsdk_datetime.h @@ -8,7 +8,7 @@ #define FPDFSDK_CPDFSDK_DATETIME_H_ #if _FX_OS_ == _FX_ANDROID_ -#include "time.h" +#include <time.h> #else #include <ctime> #endif diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h index b7afbbc489..b4e11ca763 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.h +++ b/fpdfsdk/cpdfsdk_formfillenvironment.h @@ -7,7 +7,9 @@ #ifndef FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ #define FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ +#include <map> #include <memory> +#include <vector> #include "core/fpdfapi/page/cpdf_page.h" #include "core/fpdfapi/parser/cpdf_document.h" diff --git a/fpdfsdk/cpdfsdk_interform.h b/fpdfsdk/cpdfsdk_interform.h index 4c5d10dccf..9f35d560e6 100644 --- a/fpdfsdk/cpdfsdk_interform.h +++ b/fpdfsdk/cpdfsdk_interform.h @@ -8,6 +8,7 @@ #define FPDFSDK_CPDFSDK_INTERFORM_H_ #include <map> +#include <memory> #include <vector> #include "core/fpdfdoc/cpdf_action.h" diff --git a/fpdfsdk/fpdf_dataavail_embeddertest.cpp b/fpdfsdk/fpdf_dataavail_embeddertest.cpp index cc95c1b177..c226a31b8e 100644 --- a/fpdfsdk/fpdf_dataavail_embeddertest.cpp +++ b/fpdfsdk/fpdf_dataavail_embeddertest.cpp @@ -4,7 +4,9 @@ #include <algorithm> #include <memory> +#include <set> #include <string> +#include <utility> #include <vector> #include "public/fpdfview.h" @@ -16,7 +18,7 @@ namespace { class TestAsyncLoader : public FX_DOWNLOADHINTS, FX_FILEAVAIL { public: - TestAsyncLoader(const std::string& file_name) { + explicit TestAsyncLoader(const std::string& file_name) { std::string file_path; if (!PathService::GetTestFilePath(file_name, &file_path)) return; diff --git a/fpdfsdk/fpdf_sysfontinfo.cpp b/fpdfsdk/fpdf_sysfontinfo.cpp index 6db768a8e2..1b62dc48ac 100644 --- a/fpdfsdk/fpdf_sysfontinfo.cpp +++ b/fpdfsdk/fpdf_sysfontinfo.cpp @@ -6,6 +6,8 @@ #include "public/fpdf_sysfontinfo.h" +#include <memory> + #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/cfx_gemodule.h" #include "core/fxge/fx_font.h" diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp index 401b3e478b..01d91242f4 100644 --- a/fpdfsdk/fpdfdoc.cpp +++ b/fpdfsdk/fpdfdoc.cpp @@ -6,6 +6,7 @@ #include "public/fpdf_doc.h" +#include <memory> #include <set> #include "core/fpdfapi/page/cpdf_page.h" diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp index 16160936e6..d7f1f97117 100644 --- a/fpdfsdk/fpdfdoc_embeddertest.cpp +++ b/fpdfsdk/fpdfdoc_embeddertest.cpp @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <memory> #include <string> #include "core/fxcrt/fx_string.h" diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp index 34b5993879..1f96b89677 100644 --- a/fpdfsdk/fpdfedit_embeddertest.cpp +++ b/fpdfsdk/fpdfedit_embeddertest.cpp @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <memory> +#include <string> + #include "public/fpdf_edit.h" #include "public/fpdfview.h" #include "testing/embedder_test.h" diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp index c864b82145..18a1d61791 100644 --- a/fpdfsdk/fpdfeditpage.cpp +++ b/fpdfsdk/fpdfeditpage.cpp @@ -34,7 +34,7 @@ #endif // PDF_ENABLE_XFA #if _FX_OS_ == _FX_ANDROID_ -#include "time.h" +#include <time.h> #else #include <ctime> #endif @@ -300,7 +300,7 @@ DLLEXPORT void STDCALL FPDFPage_TransformAnnots(FPDF_PAGE page, pRectArray->SetNewAt<CPDF_Number>(2, rect.right); pRectArray->SetNewAt<CPDF_Number>(3, rect.top); - // TODO: Transform AP's rectangle + // TODO(unknown): Transform AP's rectangle } } diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp index c9043249e1..89b8b5839e 100644 --- a/fpdfsdk/fpdfsave.cpp +++ b/fpdfsdk/fpdfsave.cpp @@ -6,6 +6,8 @@ #include "public/fpdf_save.h" +#include <memory> +#include <utility> #include <vector> #include "core/fpdfapi/edit/cpdf_creator.h" @@ -30,7 +32,7 @@ #endif #if _FX_OS_ == _FX_ANDROID_ -#include "time.h" +#include <time.h> #else #include <ctime> #endif diff --git a/fpdfsdk/fpdftext.cpp b/fpdfsdk/fpdftext.cpp index ce195ade26..629e596c8d 100644 --- a/fpdfsdk/fpdftext.cpp +++ b/fpdfsdk/fpdftext.cpp @@ -6,6 +6,9 @@ #include "public/fpdf_text.h" +#include <algorithm> +#include <vector> + #include "core/fpdfapi/page/cpdf_page.h" #include "core/fpdfdoc/cpdf_viewerpreferences.h" #include "core/fpdftext/cpdf_linkextract.h" diff --git a/fpdfsdk/fpdftext_embeddertest.cpp b/fpdfsdk/fpdftext_embeddertest.cpp index 46168c8ac7..198ef8a7f2 100644 --- a/fpdfsdk/fpdftext_embeddertest.cpp +++ b/fpdfsdk/fpdftext_embeddertest.cpp @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <memory> + #include "core/fxcrt/fx_basic.h" #include "public/fpdf_text.h" #include "public/fpdfview.h" diff --git a/fpdfsdk/fpdfview_embeddertest.cpp b/fpdfsdk/fpdfview_embeddertest.cpp index e712edb89a..65e52fec39 100644 --- a/fpdfsdk/fpdfview_embeddertest.cpp +++ b/fpdfsdk/fpdfview_embeddertest.cpp @@ -97,6 +97,7 @@ TEST_F(FPDFViewEmbeddertest, ViewerRef) { EXPECT_EQ(0U, FPDF_VIEWERREF_GetName(document(), "foo", buf, sizeof(buf))); // Make sure |buf| does not get written into when it appears to be too small. + // NOLINTNEXTLINE(runtime/printf) strcpy(buf, "ABCD"); EXPECT_EQ(4U, FPDF_VIEWERREF_GetName(document(), "Foo", buf, 1)); EXPECT_STREQ("ABCD", buf); diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp index b239d70695..7945786070 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp @@ -6,6 +6,8 @@ #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" +#include <utility> + #include "core/fpdfapi/parser/cpdf_document.h" #include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/cpdfsdk_interform.h" diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h index 98161e2b3e..2cd2b439d3 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h @@ -29,7 +29,7 @@ enum LoadStatus { class CPDFXFA_Context : public IXFA_AppProvider { public: - CPDFXFA_Context(std::unique_ptr<CPDF_Document> pPDFDoc); + explicit CPDFXFA_Context(std::unique_ptr<CPDF_Document> pPDFDoc); ~CPDFXFA_Context() override; bool LoadXFADoc(); diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h index 8909cf6429..a7d41a88c8 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h @@ -15,7 +15,7 @@ class IJS_Context; class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment { public: - CPDFXFA_DocEnvironment(CPDFXFA_Context*); + explicit CPDFXFA_DocEnvironment(CPDFXFA_Context*); ~CPDFXFA_DocEnvironment() override; // IXFA_DocEnvironment diff --git a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h index 5b0b414214..9f529fcbc8 100644 --- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h +++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h @@ -17,7 +17,7 @@ struct CFWL_TimerInfo; class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr { public: - CXFA_FWLAdapterTimerMgr(CPDFSDK_FormFillEnvironment* pFormFillEnv) + explicit CXFA_FWLAdapterTimerMgr(CPDFSDK_FormFillEnvironment* pFormFillEnv) : m_pFormFillEnv(pFormFillEnv) {} void Start(IFWL_Timer* pTimer, diff --git a/fpdfsdk/fxedit/fxet_list.h b/fpdfsdk/fxedit/fxet_list.h index f0257056c6..38d1957e00 100644 --- a/fpdfsdk/fxedit/fxet_list.h +++ b/fpdfsdk/fxedit/fxet_list.h @@ -7,6 +7,8 @@ #ifndef FPDFSDK_FXEDIT_FXET_LIST_H_ #define FPDFSDK_FXEDIT_FXET_LIST_H_ +#include <memory> + #include "core/fxcrt/fx_coordinates.h" #include "fpdfsdk/fxedit/fx_edit.h" diff --git a/fpdfsdk/javascript/JS_EventHandler.h b/fpdfsdk/javascript/JS_EventHandler.h index fb0e637f5f..8cfcfa7eb7 100644 --- a/fpdfsdk/javascript/JS_EventHandler.h +++ b/fpdfsdk/javascript/JS_EventHandler.h @@ -60,7 +60,7 @@ enum JS_EVENT_T { class CJS_EventHandler { public: - CJS_EventHandler(CJS_Context* pContext); + explicit CJS_EventHandler(CJS_Context* pContext); virtual ~CJS_EventHandler(); void OnApp_Init(); diff --git a/fpdfsdk/javascript/JS_GlobalData.cpp b/fpdfsdk/javascript/JS_GlobalData.cpp index 580cb466e6..68d929fb3a 100644 --- a/fpdfsdk/javascript/JS_GlobalData.cpp +++ b/fpdfsdk/javascript/JS_GlobalData.cpp @@ -6,6 +6,8 @@ #include "fpdfsdk/javascript/JS_GlobalData.h" +#include <utility> + #include "core/fdrm/crypto/fx_crypt.h" #include "third_party/base/stl_util.h" diff --git a/fpdfsdk/javascript/JS_Runtime_Stub.cpp b/fpdfsdk/javascript/JS_Runtime_Stub.cpp index 1daee4d734..96148d83a0 100644 --- a/fpdfsdk/javascript/JS_Runtime_Stub.cpp +++ b/fpdfsdk/javascript/JS_Runtime_Stub.cpp @@ -120,7 +120,7 @@ class CJS_ContextStub final : public IJS_Context { class CJS_RuntimeStub final : public IJS_Runtime { public: - CJS_RuntimeStub(CPDFSDK_FormFillEnvironment* pFormFillEnv) + explicit CJS_RuntimeStub(CPDFSDK_FormFillEnvironment* pFormFillEnv) : m_pFormFillEnv(pFormFillEnv) {} ~CJS_RuntimeStub() override {} diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp index 2b40de0423..80c952d6ca 100644 --- a/fpdfsdk/javascript/app.cpp +++ b/fpdfsdk/javascript/app.cpp @@ -6,6 +6,7 @@ #include "fpdfsdk/javascript/app.h" +#include <map> #include <memory> #include <vector> diff --git a/fpdfsdk/javascript/app.h b/fpdfsdk/javascript/app.h index 32e2aaf28c..e8c72417bb 100644 --- a/fpdfsdk/javascript/app.h +++ b/fpdfsdk/javascript/app.h @@ -18,7 +18,7 @@ class GlobalTimer; class TimerObj : public CJS_EmbedObj { public: - TimerObj(CJS_Object* pJSObject); + explicit TimerObj(CJS_Object* pJSObject); ~TimerObj() override; void SetTimer(GlobalTimer* pTimer); @@ -30,7 +30,7 @@ class TimerObj : public CJS_EmbedObj { class CJS_TimerObj : public CJS_Object { public: - CJS_TimerObj(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} + explicit CJS_TimerObj(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_TimerObj() override {} DECLARE_JS_CLASS(); @@ -38,7 +38,7 @@ class CJS_TimerObj : public CJS_Object { class app : public CJS_EmbedObj { public: - app(CJS_Object* pJSObject); + explicit app(CJS_Object* pJSObject); ~app() override; bool activeDocs(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); diff --git a/fpdfsdk/javascript/color.h b/fpdfsdk/javascript/color.h index ab56cac0b6..9ea4d63355 100644 --- a/fpdfsdk/javascript/color.h +++ b/fpdfsdk/javascript/color.h @@ -14,7 +14,7 @@ class color : public CJS_EmbedObj { public: - color(CJS_Object* pJSObject); + explicit color(CJS_Object* pJSObject); ~color() override; bool black(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); @@ -63,7 +63,7 @@ class color : public CJS_EmbedObj { class CJS_Color : public CJS_Object { public: - CJS_Color(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} + explicit CJS_Color(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Color() override {} DECLARE_JS_CLASS(); diff --git a/fpdfsdk/javascript/console.h b/fpdfsdk/javascript/console.h index 4f18980206..069a81d029 100644 --- a/fpdfsdk/javascript/console.h +++ b/fpdfsdk/javascript/console.h @@ -13,7 +13,7 @@ class console : public CJS_EmbedObj { public: - console(CJS_Object* pJSObject); + explicit console(CJS_Object* pJSObject); ~console() override; public: @@ -37,7 +37,7 @@ class console : public CJS_EmbedObj { class CJS_Console : public CJS_Object { public: - CJS_Console(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} + explicit CJS_Console(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Console() override {} DECLARE_JS_CLASS(); diff --git a/fpdfsdk/javascript/event.h b/fpdfsdk/javascript/event.h index d70b57801e..67194944d0 100644 --- a/fpdfsdk/javascript/event.h +++ b/fpdfsdk/javascript/event.h @@ -11,7 +11,7 @@ class event : public CJS_EmbedObj { public: - event(CJS_Object* pJSObject); + explicit event(CJS_Object* pJSObject); ~event() override; public: @@ -39,7 +39,7 @@ class event : public CJS_EmbedObj { class CJS_Event : public CJS_Object { public: - CJS_Event(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} + explicit CJS_Event(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Event() override {} DECLARE_JS_CLASS(); diff --git a/fpdfsdk/javascript/global.h b/fpdfsdk/javascript/global.h index c0eb4447f4..9a6568bc27 100644 --- a/fpdfsdk/javascript/global.h +++ b/fpdfsdk/javascript/global.h @@ -32,7 +32,7 @@ struct JSGlobalData { class JSGlobalAlternate : public CJS_EmbedObj { public: - JSGlobalAlternate(CJS_Object* pJSObject); + explicit JSGlobalAlternate(CJS_Object* pJSObject); ~JSGlobalAlternate() override; bool setPersistent(IJS_Context* cc, diff --git a/fpdfsdk/javascript/report.h b/fpdfsdk/javascript/report.h index 0773472a94..fef236943d 100644 --- a/fpdfsdk/javascript/report.h +++ b/fpdfsdk/javascript/report.h @@ -13,7 +13,7 @@ class Report : public CJS_EmbedObj { public: - Report(CJS_Object* pJSObject); + explicit Report(CJS_Object* pJSObject); ~Report() override; public: @@ -29,7 +29,7 @@ class Report : public CJS_EmbedObj { class CJS_Report : public CJS_Object { public: - CJS_Report(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} + explicit CJS_Report(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Report() override {} DECLARE_JS_CLASS(); diff --git a/fpdfsdk/javascript/util.h b/fpdfsdk/javascript/util.h index efcf0c8f89..80763d1e27 100644 --- a/fpdfsdk/javascript/util.h +++ b/fpdfsdk/javascript/util.h @@ -14,7 +14,7 @@ class util : public CJS_EmbedObj { public: - util(CJS_Object* pJSObject); + explicit util(CJS_Object* pJSObject); ~util() override; bool printd(IJS_Context* cc, @@ -44,7 +44,7 @@ class util : public CJS_EmbedObj { class CJS_Util : public CJS_Object { public: - CJS_Util(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} + explicit CJS_Util(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Util() override {} DECLARE_JS_CLASS(); diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/pdfwindow/PWL_EditCtrl.h index 344d25b72b..3ff5cc66c9 100644 --- a/fpdfsdk/pdfwindow/PWL_EditCtrl.h +++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.h @@ -7,6 +7,8 @@ #ifndef FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_ #define FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_ +#include <memory> + #include "core/fxcrt/fx_string.h" #include "fpdfsdk/fxedit/fx_edit.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.h b/fpdfsdk/pdfwindow/PWL_FontMap.h index fbf5ee0986..47ef193619 100644 --- a/fpdfsdk/pdfwindow/PWL_FontMap.h +++ b/fpdfsdk/pdfwindow/PWL_FontMap.h @@ -30,7 +30,7 @@ struct CPWL_FontMap_Native { class CPWL_FontMap : public IPVT_FontMap { public: - CPWL_FontMap(CFX_SystemHandler* pSystemHandler); + explicit CPWL_FontMap(CFX_SystemHandler* pSystemHandler); ~CPWL_FontMap() override; // IPVT_FontMap diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.h b/fpdfsdk/pdfwindow/PWL_ListBox.h index 290b8762ef..6db4ecb381 100644 --- a/fpdfsdk/pdfwindow/PWL_ListBox.h +++ b/fpdfsdk/pdfwindow/PWL_ListBox.h @@ -7,6 +7,8 @@ #ifndef FPDFSDK_PDFWINDOW_PWL_LISTBOX_H_ #define FPDFSDK_PDFWINDOW_PWL_LISTBOX_H_ +#include <memory> + #include "fpdfsdk/fxedit/fx_edit.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" @@ -20,7 +22,7 @@ struct CPVT_WordProps; class CPWL_List_Notify { public: - CPWL_List_Notify(CPWL_ListBox* pList); + explicit CPWL_List_Notify(CPWL_ListBox* pList); ~CPWL_List_Notify(); void IOnSetScrollInfoY(FX_FLOAT fPlateMin, diff --git a/fpdfsdk/pdfwindow/PWL_ScrollBar.h b/fpdfsdk/pdfwindow/PWL_ScrollBar.h index 19e5151c97..bcfb0a6873 100644 --- a/fpdfsdk/pdfwindow/PWL_ScrollBar.h +++ b/fpdfsdk/pdfwindow/PWL_ScrollBar.h @@ -117,7 +117,7 @@ struct PWL_SCROLL_PRIVATEDATA { class CPWL_ScrollBar : public CPWL_Wnd { public: - CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL); + explicit CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL); ~CPWL_ScrollBar() override; // CPWL_Wnd diff --git a/fpdfsdk/pdfwindow/PWL_Utils.cpp b/fpdfsdk/pdfwindow/PWL_Utils.cpp index eb6b3cc221..713a193fb3 100644 --- a/fpdfsdk/pdfwindow/PWL_Utils.cpp +++ b/fpdfsdk/pdfwindow/PWL_Utils.cpp @@ -7,6 +7,7 @@ #include "fpdfsdk/pdfwindow/PWL_Utils.h" #include <algorithm> +#include <memory> #include "core/fpdfdoc/cpvt_word.h" #include "core/fxge/cfx_graphstatedata.h" diff --git a/fxjs/cfxjse_class.cpp b/fxjs/cfxjse_class.cpp index 644e81a4f3..fd97b575ed 100644 --- a/fxjs/cfxjse_class.cpp +++ b/fxjs/cfxjse_class.cpp @@ -6,6 +6,8 @@ #include "fxjs/cfxjse_class.h" +#include <memory> + #include "fxjs/cfxjse_context.h" #include "fxjs/cfxjse_value.h" diff --git a/fxjs/cfxjse_isolatetracker.cpp b/fxjs/cfxjse_isolatetracker.cpp index adf6f2a92e..0dd4158714 100644 --- a/fxjs/cfxjse_isolatetracker.cpp +++ b/fxjs/cfxjse_isolatetracker.cpp @@ -7,6 +7,7 @@ #include "fxjs/cfxjse_isolatetracker.h" #include <algorithm> +#include <utility> CFXJSE_IsolateTracker::CFXJSE_IsolateTracker() {} diff --git a/fxjs/cfxjse_runtimedata.cpp b/fxjs/cfxjse_runtimedata.cpp index 4f5cfbcbcb..b8df9ce0b3 100644 --- a/fxjs/cfxjse_runtimedata.cpp +++ b/fxjs/cfxjse_runtimedata.cpp @@ -6,6 +6,8 @@ #include "fxjs/cfxjse_runtimedata.h" +#include <utility> + #include "fxjs/cfxjse_isolatetracker.h" #include "fxjs/fxjs_v8.h" diff --git a/public/fpdf_dataavail.h b/public/fpdf_dataavail.h index 5599171619..2413e2be7a 100644 --- a/public/fpdf_dataavail.h +++ b/public/fpdf_dataavail.h @@ -9,6 +9,7 @@ #include <stddef.h> +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" #define PDF_LINEARIZATION_UNKNOWN -1 diff --git a/public/fpdf_doc.h b/public/fpdf_doc.h index 206dc37a27..9d2229c0c1 100644 --- a/public/fpdf_doc.h +++ b/public/fpdf_doc.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_DOC_H_ #define PUBLIC_FPDF_DOC_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" #ifdef __cplusplus diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h index 47fdf9e76e..dabdbedd48 100644 --- a/public/fpdf_edit.h +++ b/public/fpdf_edit.h @@ -9,6 +9,7 @@ #include <stdint.h> +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" #define FPDF_ARGB(a, r, g, b) \ diff --git a/public/fpdf_ext.h b/public/fpdf_ext.h index 2f7d7ddf64..3465878990 100644 --- a/public/fpdf_ext.h +++ b/public/fpdf_ext.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_EXT_H_ #define PUBLIC_FPDF_EXT_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" #ifdef __cplusplus diff --git a/public/fpdf_flatten.h b/public/fpdf_flatten.h index 8d641809fe..c1e354e906 100644 --- a/public/fpdf_flatten.h +++ b/public/fpdf_flatten.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_FLATTEN_H_ #define PUBLIC_FPDF_FLATTEN_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" // Flatten operation failed. diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h index e11f85c89f..ada87d3158 100644 --- a/public/fpdf_formfill.h +++ b/public/fpdf_formfill.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_FORMFILL_H_ #define PUBLIC_FPDF_FORMFILL_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" typedef void* FPDF_FORMHANDLE; diff --git a/public/fpdf_fwlevent.h b/public/fpdf_fwlevent.h index 8d2f1a4d76..591484a5d0 100644 --- a/public/fpdf_fwlevent.h +++ b/public/fpdf_fwlevent.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_FWLEVENT_H_ #define PUBLIC_FPDF_FWLEVENT_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" #ifdef __cplusplus diff --git a/public/fpdf_ppo.h b/public/fpdf_ppo.h index 532494e7fa..d9c83002b5 100644 --- a/public/fpdf_ppo.h +++ b/public/fpdf_ppo.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_PPO_H_ #define PUBLIC_FPDF_PPO_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" #ifdef __cplusplus diff --git a/public/fpdf_progressive.h b/public/fpdf_progressive.h index ffc812df77..0c3d501317 100644 --- a/public/fpdf_progressive.h +++ b/public/fpdf_progressive.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_PROGRESSIVE_H_ #define PUBLIC_FPDF_PROGRESSIVE_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" // Flags for progressive process status. diff --git a/public/fpdf_save.h b/public/fpdf_save.h index 44520a5baf..c34e2bc6c7 100644 --- a/public/fpdf_save.h +++ b/public/fpdf_save.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_SAVE_H_ #define PUBLIC_FPDF_SAVE_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" #ifdef __cplusplus diff --git a/public/fpdf_searchex.h b/public/fpdf_searchex.h index 0d90bdddb9..7c1b31848e 100644 --- a/public/fpdf_searchex.h +++ b/public/fpdf_searchex.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_SEARCHEX_H_ #define PUBLIC_FPDF_SEARCHEX_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" #ifdef __cplusplus diff --git a/public/fpdf_sysfontinfo.h b/public/fpdf_sysfontinfo.h index d75aa19629..a0edffffa2 100644 --- a/public/fpdf_sysfontinfo.h +++ b/public/fpdf_sysfontinfo.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_SYSFONTINFO_H_ #define PUBLIC_FPDF_SYSFONTINFO_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" /* Character sets for the font */ diff --git a/public/fpdf_text.h b/public/fpdf_text.h index 2bf574b12f..5c241527eb 100644 --- a/public/fpdf_text.h +++ b/public/fpdf_text.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_TEXT_H_ #define PUBLIC_FPDF_TEXT_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" // Exported Functions diff --git a/public/fpdf_transformpage.h b/public/fpdf_transformpage.h index 569df2a7e0..66271fcda8 100644 --- a/public/fpdf_transformpage.h +++ b/public/fpdf_transformpage.h @@ -7,6 +7,7 @@ #ifndef PUBLIC_FPDF_TRANSFORMPAGE_H_ #define PUBLIC_FPDF_TRANSFORMPAGE_H_ +// NOLINTNEXTLINE(build/include) #include "fpdfview.h" #ifdef __cplusplus diff --git a/xfa/fde/cfde_txtedtbuf.cpp b/xfa/fde/cfde_txtedtbuf.cpp index 6d36eb3da2..b01081e3c9 100644 --- a/xfa/fde/cfde_txtedtbuf.cpp +++ b/xfa/fde/cfde_txtedtbuf.cpp @@ -6,6 +6,8 @@ #include "xfa/fde/cfde_txtedtbuf.h" +#include <algorithm> + #include "xfa/fgas/crt/fgas_memory.h" namespace { diff --git a/xfa/fde/cfde_txtedtbufiter.h b/xfa/fde/cfde_txtedtbufiter.h index 4322708a2a..c536aafc82 100644 --- a/xfa/fde/cfde_txtedtbufiter.h +++ b/xfa/fde/cfde_txtedtbufiter.h @@ -14,7 +14,7 @@ class CFDE_TxtEdtBuf; class CFDE_TxtEdtBufIter : public IFX_CharIter { public: - CFDE_TxtEdtBufIter(CFDE_TxtEdtBuf* pBuf, FX_WCHAR wcAlias = 0); + explicit CFDE_TxtEdtBufIter(CFDE_TxtEdtBuf* pBuf, FX_WCHAR wcAlias = 0); ~CFDE_TxtEdtBufIter() override; bool Next(bool bPrev = false) override; diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp index e0e788144a..ad20b04feb 100644 --- a/xfa/fde/cfde_txtedtengine.cpp +++ b/xfa/fde/cfde_txtedtengine.cpp @@ -6,6 +6,8 @@ #include "xfa/fde/cfde_txtedtengine.h" +#include <algorithm> + #include "xfa/fde/cfde_txtedtbuf.h" #include "xfa/fde/cfde_txtedtbufiter.h" #include "xfa/fde/cfde_txtedtdorecord_deleterange.h" diff --git a/xfa/fde/cfde_txtedtparag.cpp b/xfa/fde/cfde_txtedtparag.cpp index 6e6a664ff2..244add4e0a 100644 --- a/xfa/fde/cfde_txtedtparag.cpp +++ b/xfa/fde/cfde_txtedtparag.cpp @@ -6,6 +6,8 @@ #include "xfa/fde/cfde_txtedtparag.h" +#include <memory> + #include "xfa/fde/cfde_txtedtbuf.h" #include "xfa/fde/cfde_txtedtbufiter.h" #include "xfa/fde/cfde_txtedtengine.h" diff --git a/xfa/fde/cfx_wordbreak.cpp b/xfa/fde/cfx_wordbreak.cpp index 04fc32f550..48b45a4e82 100644 --- a/xfa/fde/cfx_wordbreak.cpp +++ b/xfa/fde/cfx_wordbreak.cpp @@ -6,6 +6,8 @@ #include "xfa/fde/cfx_wordbreak.h" +#include <utility> + #include "xfa/fde/cfx_chariter.h" namespace { diff --git a/xfa/fde/css/cfde_cssrulecollection.cpp b/xfa/fde/css/cfde_cssrulecollection.cpp index 28a482b834..2f91c13628 100644 --- a/xfa/fde/css/cfde_cssrulecollection.cpp +++ b/xfa/fde/css/cfde_cssrulecollection.cpp @@ -11,7 +11,6 @@ #include "xfa/fde/css/fde_csscache.h" #include "xfa/fde/css/fde_cssdeclaration.h" -#include "xfa/fde/css/fde_cssstyleselector.h" #include "xfa/fde/css/fde_cssstylesheet.h" #include "xfa/fde/css/fde_csssyntax.h" #include "xfa/fxfa/app/xfa_textlayout.h" diff --git a/xfa/fde/css/fde_cssstyleselector.h b/xfa/fde/css/fde_cssstyleselector.h index 8ef3885823..0096b7a34a 100644 --- a/xfa/fde/css/fde_cssstyleselector.h +++ b/xfa/fde/css/fde_cssstyleselector.h @@ -353,7 +353,7 @@ class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle, public IFDE_CSSParagraphStyle, public CFX_Target { public: - CFDE_CSSComputedStyle(IFX_MemoryAllocator* pAlloc); + explicit CFDE_CSSComputedStyle(IFX_MemoryAllocator* pAlloc); ~CFDE_CSSComputedStyle() override; // IFX_Retainable diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h index 0fe63477d3..7d3ec98844 100644 --- a/xfa/fde/css/fde_cssstylesheet.h +++ b/xfa/fde/css/fde_cssstylesheet.h @@ -96,7 +96,7 @@ class CFDE_CSSFontFaceRule : public IFDE_CSSFontFaceRule, public CFX_Target { class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet, public CFX_Target { public: - CFDE_CSSStyleSheet(uint32_t dwMediaList); + explicit CFDE_CSSStyleSheet(uint32_t dwMediaList); ~CFDE_CSSStyleSheet() override; // IFX_Retainable: diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp index 4adfd54af4..254193659d 100644 --- a/xfa/fde/fde_gedevice.cpp +++ b/xfa/fde/fde_gedevice.cpp @@ -7,6 +7,7 @@ #include "xfa/fde/fde_gedevice.h" #include <algorithm> +#include <memory> #include "core/fxge/cfx_gemodule.h" #include "core/fxge/cfx_graphstatedata.h" diff --git a/xfa/fde/xml/fde_xml_imp_unittest.cpp b/xfa/fde/xml/fde_xml_imp_unittest.cpp index f0d0bca2ca..e5bcb0acb2 100644 --- a/xfa/fde/xml/fde_xml_imp_unittest.cpp +++ b/xfa/fde/xml/fde_xml_imp_unittest.cpp @@ -4,6 +4,8 @@ #include "xfa/fde/xml/fde_xml_imp.h" +#include <memory> + #include "testing/gtest/include/gtest/gtest.h" #include "xfa/fgas/crt/fgas_stream.h" 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; diff --git a/xfa/fwl/core/cfwl_listbox.cpp b/xfa/fwl/core/cfwl_listbox.cpp index 0f931d9905..faedf5bef7 100644 --- a/xfa/fwl/core/cfwl_listbox.cpp +++ b/xfa/fwl/core/cfwl_listbox.cpp @@ -7,6 +7,7 @@ #include "xfa/fwl/core/cfwl_listbox.h" #include <memory> +#include <utility> #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" diff --git a/xfa/fwl/core/cfwl_msgkey.cpp b/xfa/fwl/core/cfwl_msgkey.cpp index 0163da9e8d..7d839f7203 100644 --- a/xfa/fwl/core/cfwl_msgkey.cpp +++ b/xfa/fwl/core/cfwl_msgkey.cpp @@ -6,6 +6,8 @@ #include "xfa/fwl/core/cfwl_msgkey.h" +#include <memory> + #include "third_party/base/ptr_util.h" CFWL_MsgKey::CFWL_MsgKey() {} diff --git a/xfa/fwl/core/cfwl_msgkey.h b/xfa/fwl/core/cfwl_msgkey.h index 492e53fdfb..c7cd74315c 100644 --- a/xfa/fwl/core/cfwl_msgkey.h +++ b/xfa/fwl/core/cfwl_msgkey.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_CFWL_MSGKEY_H_ #define XFA_FWL_CORE_CFWL_MSGKEY_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_message.h" enum class FWL_KeyCommand { KeyDown, KeyUp, Char }; diff --git a/xfa/fwl/core/cfwl_msgkillfocus.cpp b/xfa/fwl/core/cfwl_msgkillfocus.cpp index c2407edfef..0c8ac47029 100644 --- a/xfa/fwl/core/cfwl_msgkillfocus.cpp +++ b/xfa/fwl/core/cfwl_msgkillfocus.cpp @@ -6,6 +6,8 @@ #include "xfa/fwl/core/cfwl_msgkillfocus.h" +#include <memory> + #include "third_party/base/ptr_util.h" CFWL_MsgKillFocus::CFWL_MsgKillFocus() {} diff --git a/xfa/fwl/core/cfwl_msgkillfocus.h b/xfa/fwl/core/cfwl_msgkillfocus.h index d2a1f20db4..71c52d90c7 100644 --- a/xfa/fwl/core/cfwl_msgkillfocus.h +++ b/xfa/fwl/core/cfwl_msgkillfocus.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_CFWL_MSGKILLFOCUS_H_ #define XFA_FWL_CORE_CFWL_MSGKILLFOCUS_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_message.h" class CFWL_MsgKillFocus : public CFWL_Message { diff --git a/xfa/fwl/core/cfwl_msgmouse.cpp b/xfa/fwl/core/cfwl_msgmouse.cpp index ff28cdc9c8..de2540d8fc 100644 --- a/xfa/fwl/core/cfwl_msgmouse.cpp +++ b/xfa/fwl/core/cfwl_msgmouse.cpp @@ -6,6 +6,8 @@ #include "xfa/fwl/core/cfwl_msgmouse.h" +#include <memory> + #include "third_party/base/ptr_util.h" CFWL_MsgMouse::CFWL_MsgMouse() {} diff --git a/xfa/fwl/core/cfwl_msgmouse.h b/xfa/fwl/core/cfwl_msgmouse.h index c617ac1d42..5a4054c024 100644 --- a/xfa/fwl/core/cfwl_msgmouse.h +++ b/xfa/fwl/core/cfwl_msgmouse.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_CFWL_MSGMOUSE_H_ #define XFA_FWL_CORE_CFWL_MSGMOUSE_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_message.h" enum class FWL_MouseCommand { diff --git a/xfa/fwl/core/cfwl_msgmousewheel.cpp b/xfa/fwl/core/cfwl_msgmousewheel.cpp index b5cbd14da0..739c43174c 100644 --- a/xfa/fwl/core/cfwl_msgmousewheel.cpp +++ b/xfa/fwl/core/cfwl_msgmousewheel.cpp @@ -6,6 +6,8 @@ #include "xfa/fwl/core/cfwl_msgmousewheel.h" +#include <memory> + #include "third_party/base/ptr_util.h" CFWL_MsgMouseWheel::CFWL_MsgMouseWheel() {} diff --git a/xfa/fwl/core/cfwl_msgmousewheel.h b/xfa/fwl/core/cfwl_msgmousewheel.h index c913eae42c..076870135b 100644 --- a/xfa/fwl/core/cfwl_msgmousewheel.h +++ b/xfa/fwl/core/cfwl_msgmousewheel.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_CFWL_MSGMOUSEWHEEL_H_ #define XFA_FWL_CORE_CFWL_MSGMOUSEWHEEL_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_message.h" class CFWL_MsgMouseWheel : public CFWL_Message { diff --git a/xfa/fwl/core/cfwl_msgsetfocus.cpp b/xfa/fwl/core/cfwl_msgsetfocus.cpp index 7fe3501a6a..0463da1c6c 100644 --- a/xfa/fwl/core/cfwl_msgsetfocus.cpp +++ b/xfa/fwl/core/cfwl_msgsetfocus.cpp @@ -6,6 +6,8 @@ #include "xfa/fwl/core/cfwl_msgsetfocus.h" +#include <memory> + #include "third_party/base/ptr_util.h" CFWL_MsgSetFocus::CFWL_MsgSetFocus() {} diff --git a/xfa/fwl/core/cfwl_msgsetfocus.h b/xfa/fwl/core/cfwl_msgsetfocus.h index ffcf5b3539..47eab2a12a 100644 --- a/xfa/fwl/core/cfwl_msgsetfocus.h +++ b/xfa/fwl/core/cfwl_msgsetfocus.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_CFWL_MSGSETFOCUS_H_ #define XFA_FWL_CORE_CFWL_MSGSETFOCUS_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_message.h" class CFWL_MsgSetFocus : public CFWL_Message { diff --git a/xfa/fwl/core/cfwl_widget.cpp b/xfa/fwl/core/cfwl_widget.cpp index 7cd2ca3913..39d86fa8ba 100644 --- a/xfa/fwl/core/cfwl_widget.cpp +++ b/xfa/fwl/core/cfwl_widget.cpp @@ -10,7 +10,6 @@ #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/core/cfwl_widgetmgr.cpp b/xfa/fwl/core/cfwl_widgetmgr.cpp index 9172d7918a..6623e8f9fb 100644 --- a/xfa/fwl/core/cfwl_widgetmgr.cpp +++ b/xfa/fwl/core/cfwl_widgetmgr.cpp @@ -6,6 +6,8 @@ #include "xfa/fwl/core/cfwl_widgetmgr.h" +#include <utility> + #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_form.h" diff --git a/xfa/fwl/core/cfwl_widgetproperties.h b/xfa/fwl/core/cfwl_widgetproperties.h index cadba3f8c7..83e54f1672 100644 --- a/xfa/fwl/core/cfwl_widgetproperties.h +++ b/xfa/fwl/core/cfwl_widgetproperties.h @@ -18,7 +18,7 @@ class IFWL_Widget; class CFWL_WidgetProperties { public: CFWL_WidgetProperties(); - CFWL_WidgetProperties(IFWL_Widget::DataProvider* dataProvider); + explicit CFWL_WidgetProperties(IFWL_Widget::DataProvider* dataProvider); ~CFWL_WidgetProperties(); CFX_RectF m_rtWidget; diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp index 857fdfbac6..8b9a7236fe 100644 --- a/xfa/fwl/core/fwl_noteimp.cpp +++ b/xfa/fwl/core/fwl_noteimp.cpp @@ -6,6 +6,8 @@ #include "xfa/fwl/core/fwl_noteimp.h" +#include <utility> + #include "core/fxcrt/fx_ext.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" diff --git a/xfa/fwl/core/fwl_noteimp.h b/xfa/fwl/core/fwl_noteimp.h index ec7855dec6..5a530ed9af 100644 --- a/xfa/fwl/core/fwl_noteimp.h +++ b/xfa/fwl/core/fwl_noteimp.h @@ -95,7 +95,7 @@ class CFWL_NoteDriver { class CFWL_EventTarget { public: - CFWL_EventTarget(IFWL_Widget* pListener); + explicit CFWL_EventTarget(IFWL_Widget* pListener); ~CFWL_EventTarget(); int32_t SetEventSource(IFWL_Widget* pSource, diff --git a/xfa/fwl/core/ifwl_barcode.cpp b/xfa/fwl/core/ifwl_barcode.cpp index d055a4bcd1..e4084aa9c6 100644 --- a/xfa/fwl/core/ifwl_barcode.cpp +++ b/xfa/fwl/core/ifwl_barcode.cpp @@ -6,6 +6,8 @@ #include "xfa/fwl/core/ifwl_barcode.h" +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fgas/font/fgas_gefont.h" #include "xfa/fwl/core/cfwl_themepart.h" diff --git a/xfa/fwl/core/ifwl_caret.cpp b/xfa/fwl/core/ifwl_caret.cpp index cba6c44aa3..b7607e3597 100644 --- a/xfa/fwl/core/ifwl_caret.cpp +++ b/xfa/fwl/core/ifwl_caret.cpp @@ -6,11 +6,12 @@ #include "xfa/fwl/core/ifwl_caret.h" +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_widgetproperties.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/ifwl_caret.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fwl/core/ifwl_timerinfo.h" diff --git a/xfa/fwl/core/ifwl_checkbox.cpp b/xfa/fwl/core/ifwl_checkbox.cpp index 1f053dbe20..0d18e2cec5 100644 --- a/xfa/fwl/core/ifwl_checkbox.cpp +++ b/xfa/fwl/core/ifwl_checkbox.cpp @@ -7,6 +7,8 @@ #include "xfa/fwl/core/ifwl_checkbox.h" #include <algorithm> +#include <memory> +#include <utility> #include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" @@ -18,7 +20,6 @@ #include "xfa/fwl/core/cfwl_widgetmgr.h" #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/ifwl_app.h" -#include "xfa/fwl/core/ifwl_checkbox.h" #include "xfa/fwl/core/ifwl_themeprovider.h" namespace { diff --git a/xfa/fwl/core/ifwl_checkbox.h b/xfa/fwl/core/ifwl_checkbox.h index b947e954ae..30d9b637a0 100644 --- a/xfa/fwl/core/ifwl_checkbox.h +++ b/xfa/fwl/core/ifwl_checkbox.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_CHECKBOX_H_ #define XFA_FWL_CORE_IFWL_CHECKBOX_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_event.h" #include "xfa/fwl/core/cfwl_widgetproperties.h" #include "xfa/fwl/core/ifwl_widget.h" diff --git a/xfa/fwl/core/ifwl_combobox.cpp b/xfa/fwl/core/ifwl_combobox.cpp index 12e009f91a..b85f4e4959 100644 --- a/xfa/fwl/core/ifwl_combobox.cpp +++ b/xfa/fwl/core/ifwl_combobox.cpp @@ -6,6 +6,10 @@ #include "xfa/fwl/core/ifwl_combobox.h" +#include <algorithm> +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fde/cfde_txtedtengine.h" #include "xfa/fde/tto/fde_textout.h" @@ -24,7 +28,6 @@ #include "xfa/fwl/core/cfwl_widgetmgr.h" #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/ifwl_app.h" -#include "xfa/fwl/core/ifwl_combobox.h" #include "xfa/fwl/core/ifwl_formproxy.h" #include "xfa/fwl/core/ifwl_listbox.h" #include "xfa/fwl/core/ifwl_themeprovider.h" diff --git a/xfa/fwl/core/ifwl_combobox.h b/xfa/fwl/core/ifwl_combobox.h index 7cf17e2881..db5b0678ae 100644 --- a/xfa/fwl/core/ifwl_combobox.h +++ b/xfa/fwl/core/ifwl_combobox.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_COMBOBOX_H_ #define XFA_FWL_CORE_IFWL_COMBOBOX_H_ +#include <memory> + #include "xfa/fwl/core/ifwl_comboboxproxy.h" #include "xfa/fwl/core/ifwl_comboedit.h" #include "xfa/fwl/core/ifwl_combolist.h" diff --git a/xfa/fwl/core/ifwl_comboboxproxy.cpp b/xfa/fwl/core/ifwl_comboboxproxy.cpp index 03bfca2727..f454f4c9eb 100644 --- a/xfa/fwl/core/ifwl_comboboxproxy.cpp +++ b/xfa/fwl/core/ifwl_comboboxproxy.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_comboboxproxy.h" +#include <memory> +#include <utility> + #include "xfa/fwl/core/cfwl_msgkillfocus.h" #include "xfa/fwl/core/cfwl_msgmouse.h" #include "xfa/fwl/core/fwl_noteimp.h" diff --git a/xfa/fwl/core/ifwl_comboboxproxy.h b/xfa/fwl/core/ifwl_comboboxproxy.h index 7ff56232f8..3425005e81 100644 --- a/xfa/fwl/core/ifwl_comboboxproxy.h +++ b/xfa/fwl/core/ifwl_comboboxproxy.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_COMBOBOXPROXY_H_ #define XFA_FWL_CORE_IFWL_COMBOBOXPROXY_H_ +#include <memory> + #include "xfa/fwl/core/ifwl_formproxy.h" class IFWL_ComboBox; diff --git a/xfa/fwl/core/ifwl_comboedit.cpp b/xfa/fwl/core/ifwl_comboedit.cpp index 965ba009f2..07fe5150ad 100644 --- a/xfa/fwl/core/ifwl_comboedit.cpp +++ b/xfa/fwl/core/ifwl_comboedit.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_comboedit.h" +#include <memory> +#include <utility> + #include "xfa/fde/cfde_txtedtengine.h" #include "xfa/fwl/core/cfwl_msgmouse.h" #include "xfa/fwl/core/ifwl_combobox.h" diff --git a/xfa/fwl/core/ifwl_comboedit.h b/xfa/fwl/core/ifwl_comboedit.h index c7d2e1072e..21b9cf90c7 100644 --- a/xfa/fwl/core/ifwl_comboedit.h +++ b/xfa/fwl/core/ifwl_comboedit.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_COMBOEDIT_H_ #define XFA_FWL_CORE_IFWL_COMBOEDIT_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_widgetproperties.h" #include "xfa/fwl/core/ifwl_edit.h" #include "xfa/fwl/core/ifwl_widget.h" diff --git a/xfa/fwl/core/ifwl_combolist.cpp b/xfa/fwl/core/ifwl_combolist.cpp index deaab7860b..e3ddcd08d9 100644 --- a/xfa/fwl/core/ifwl_combolist.cpp +++ b/xfa/fwl/core/ifwl_combolist.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_combolist.h" +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fwl/core/cfwl_msgkey.h" #include "xfa/fwl/core/cfwl_msgkillfocus.h" diff --git a/xfa/fwl/core/ifwl_combolist.h b/xfa/fwl/core/ifwl_combolist.h index ff479cbefe..360bc20059 100644 --- a/xfa/fwl/core/ifwl_combolist.h +++ b/xfa/fwl/core/ifwl_combolist.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_COMBOLIST_H_ #define XFA_FWL_CORE_IFWL_COMBOLIST_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_widgetproperties.h" #include "xfa/fwl/core/ifwl_listbox.h" #include "xfa/fwl/core/ifwl_widget.h" diff --git a/xfa/fwl/core/ifwl_datetimeedit.cpp b/xfa/fwl/core/ifwl_datetimeedit.cpp index 636209754c..a996dc138e 100644 --- a/xfa/fwl/core/ifwl_datetimeedit.cpp +++ b/xfa/fwl/core/ifwl_datetimeedit.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_datetimeedit.h" +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fwl/core/cfwl_msgmouse.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" diff --git a/xfa/fwl/core/ifwl_datetimeedit.h b/xfa/fwl/core/ifwl_datetimeedit.h index 71745500b0..a814796c5a 100644 --- a/xfa/fwl/core/ifwl_datetimeedit.h +++ b/xfa/fwl/core/ifwl_datetimeedit.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_DATETIMEEDIT_H_ #define XFA_FWL_CORE_IFWL_DATETIMEEDIT_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_widgetproperties.h" #include "xfa/fwl/core/fwl_error.h" #include "xfa/fwl/core/ifwl_edit.h" diff --git a/xfa/fwl/core/ifwl_datetimepicker.cpp b/xfa/fwl/core/ifwl_datetimepicker.cpp index 8d5d6cf442..dca32c3b42 100644 --- a/xfa/fwl/core/ifwl_datetimepicker.cpp +++ b/xfa/fwl/core/ifwl_datetimepicker.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_datetimepicker.h" +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fwl/core/cfwl_evteditchanged.h" #include "xfa/fwl/core/cfwl_evtselectchanged.h" diff --git a/xfa/fwl/core/ifwl_datetimepicker.h b/xfa/fwl/core/ifwl_datetimepicker.h index c8d70f5575..9d7b83a6c8 100644 --- a/xfa/fwl/core/ifwl_datetimepicker.h +++ b/xfa/fwl/core/ifwl_datetimepicker.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ #define XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_event.h" #include "xfa/fwl/core/cfwl_widgetproperties.h" #include "xfa/fwl/core/ifwl_datetimeedit.h" diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp index c3b0be0240..d129e70a8c 100644 --- a/xfa/fwl/core/ifwl_edit.cpp +++ b/xfa/fwl/core/ifwl_edit.cpp @@ -8,6 +8,7 @@ #include <algorithm> #include <memory> +#include <utility> #include <vector> #include "third_party/base/ptr_util.h" diff --git a/xfa/fwl/core/ifwl_edit.h b/xfa/fwl/core/ifwl_edit.h index a46245e122..04288a51e4 100644 --- a/xfa/fwl/core/ifwl_edit.h +++ b/xfa/fwl/core/ifwl_edit.h @@ -8,6 +8,7 @@ #define XFA_FWL_CORE_IFWL_EDIT_H_ #include <deque> +#include <memory> #include <vector> #include "xfa/fde/cfde_txtedtengine.h" diff --git a/xfa/fwl/core/ifwl_form.cpp b/xfa/fwl/core/ifwl_form.cpp index 57e2507257..f89261d422 100644 --- a/xfa/fwl/core/ifwl_form.cpp +++ b/xfa/fwl/core/ifwl_form.cpp @@ -6,6 +6,8 @@ #include "xfa/fwl/core/ifwl_form.h" +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" #include "xfa/fwl/core/cfwl_evtclose.h" diff --git a/xfa/fwl/core/ifwl_formproxy.cpp b/xfa/fwl/core/ifwl_formproxy.cpp index 1bdc002b18..0e85d986ed 100644 --- a/xfa/fwl/core/ifwl_formproxy.cpp +++ b/xfa/fwl/core/ifwl_formproxy.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_formproxy.h" +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fwl/core/fwl_noteimp.h" diff --git a/xfa/fwl/core/ifwl_formproxy.h b/xfa/fwl/core/ifwl_formproxy.h index b86d609a72..bd2fe893bd 100644 --- a/xfa/fwl/core/ifwl_formproxy.h +++ b/xfa/fwl/core/ifwl_formproxy.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_FORMPROXY_H_ #define XFA_FWL_CORE_IFWL_FORMPROXY_H_ +#include <memory> + #include "xfa/fwl/core/ifwl_form.h" class CFWL_WidgetProperties; diff --git a/xfa/fwl/core/ifwl_listbox.cpp b/xfa/fwl/core/ifwl_listbox.cpp index 785f5a3f80..a1646e2c92 100644 --- a/xfa/fwl/core/ifwl_listbox.cpp +++ b/xfa/fwl/core/ifwl_listbox.cpp @@ -6,6 +6,10 @@ #include "xfa/fwl/core/ifwl_listbox.h" +#include <algorithm> +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" #include "xfa/fwl/core/cfwl_msgkey.h" @@ -15,7 +19,6 @@ #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/ifwl_app.h" -#include "xfa/fwl/core/ifwl_listbox.h" #include "xfa/fwl/core/ifwl_themeprovider.h" namespace { diff --git a/xfa/fwl/core/ifwl_monthcalendar.cpp b/xfa/fwl/core/ifwl_monthcalendar.cpp index ab9cbc411e..3d7dbf549f 100644 --- a/xfa/fwl/core/ifwl_monthcalendar.cpp +++ b/xfa/fwl/core/ifwl_monthcalendar.cpp @@ -7,6 +7,8 @@ #include "xfa/fwl/core/ifwl_monthcalendar.h" #include <algorithm> +#include <memory> +#include <utility> #include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" @@ -16,7 +18,6 @@ #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/ifwl_datetimepicker.h" #include "xfa/fwl/core/ifwl_formproxy.h" -#include "xfa/fwl/core/ifwl_monthcalendar.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #define MONTHCAL_HSEP_HEIGHT 1 diff --git a/xfa/fwl/core/ifwl_monthcalendar.h b/xfa/fwl/core/ifwl_monthcalendar.h index 7a8b3125a6..f2c072e978 100644 --- a/xfa/fwl/core/ifwl_monthcalendar.h +++ b/xfa/fwl/core/ifwl_monthcalendar.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_MONTHCALENDAR_H_ #define XFA_FWL_CORE_IFWL_MONTHCALENDAR_H_ +#include <memory> + #include "xfa/fgas/localization/fgas_datetime.h" #include "xfa/fwl/core/cfwl_event.h" #include "xfa/fwl/core/cfwl_widgetproperties.h" diff --git a/xfa/fwl/core/ifwl_picturebox.cpp b/xfa/fwl/core/ifwl_picturebox.cpp index 38685f73b1..f1bec5134a 100644 --- a/xfa/fwl/core/ifwl_picturebox.cpp +++ b/xfa/fwl/core/ifwl_picturebox.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_picturebox.h" +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fwl/core/cfwl_picturebox.h" #include "xfa/fwl/core/fwl_noteimp.h" diff --git a/xfa/fwl/core/ifwl_picturebox.h b/xfa/fwl/core/ifwl_picturebox.h index 5036cf9eef..d303992a56 100644 --- a/xfa/fwl/core/ifwl_picturebox.h +++ b/xfa/fwl/core/ifwl_picturebox.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_PICTUREBOX_H_ #define XFA_FWL_CORE_IFWL_PICTUREBOX_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_widgetproperties.h" #include "xfa/fwl/core/ifwl_widget.h" diff --git a/xfa/fwl/core/ifwl_pushbutton.cpp b/xfa/fwl/core/ifwl_pushbutton.cpp index 23f141b1dc..b1894931d5 100644 --- a/xfa/fwl/core/ifwl_pushbutton.cpp +++ b/xfa/fwl/core/ifwl_pushbutton.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_pushbutton.h" +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" #include "xfa/fwl/core/cfwl_evtclick.h" @@ -15,7 +18,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themetext.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/ifwl_pushbutton.h" #include "xfa/fwl/core/ifwl_themeprovider.h" IFWL_PushButton::IFWL_PushButton( diff --git a/xfa/fwl/core/ifwl_pushbutton.h b/xfa/fwl/core/ifwl_pushbutton.h index 8651aa019d..a3fa8da1a8 100644 --- a/xfa/fwl/core/ifwl_pushbutton.h +++ b/xfa/fwl/core/ifwl_pushbutton.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_PUSHBUTTON_H_ #define XFA_FWL_CORE_IFWL_PUSHBUTTON_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_widgetproperties.h" #include "xfa/fwl/core/ifwl_widget.h" diff --git a/xfa/fwl/core/ifwl_scrollbar.cpp b/xfa/fwl/core/ifwl_scrollbar.cpp index 54b3f217da..9d5f7a685e 100644 --- a/xfa/fwl/core/ifwl_scrollbar.cpp +++ b/xfa/fwl/core/ifwl_scrollbar.cpp @@ -6,13 +6,16 @@ #include "xfa/fwl/core/ifwl_scrollbar.h" +#include <algorithm> +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fwl/core/cfwl_msgmouse.h" #include "xfa/fwl/core/cfwl_msgmousewheel.h" #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/ifwl_scrollbar.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fwl/core/ifwl_timerinfo.h" diff --git a/xfa/fwl/core/ifwl_scrollbar.h b/xfa/fwl/core/ifwl_scrollbar.h index ac19a30fed..148abf982b 100644 --- a/xfa/fwl/core/ifwl_scrollbar.h +++ b/xfa/fwl/core/ifwl_scrollbar.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_SCROLLBAR_H_ #define XFA_FWL_CORE_IFWL_SCROLLBAR_H_ +#include <memory> + #include "core/fxcrt/fx_system.h" #include "xfa/fwl/core/cfwl_evtscroll.h" #include "xfa/fwl/core/cfwl_widgetproperties.h" diff --git a/xfa/fwl/core/ifwl_spinbutton.cpp b/xfa/fwl/core/ifwl_spinbutton.cpp index a12c7bbeae..fa063d6da5 100644 --- a/xfa/fwl/core/ifwl_spinbutton.cpp +++ b/xfa/fwl/core/ifwl_spinbutton.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_spinbutton.h" +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fwl/core/cfwl_evtclick.h" #include "xfa/fwl/core/cfwl_msgkey.h" @@ -13,8 +16,6 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_widgetproperties.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/ifwl_spinbutton.h" -#include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fwl/core/ifwl_timerinfo.h" diff --git a/xfa/fwl/core/ifwl_spinbutton.h b/xfa/fwl/core/ifwl_spinbutton.h index e2fda86da0..bc4f3ab1a8 100644 --- a/xfa/fwl/core/ifwl_spinbutton.h +++ b/xfa/fwl/core/ifwl_spinbutton.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_SPINBUTTON_H_ #define XFA_FWL_CORE_IFWL_SPINBUTTON_H_ +#include <memory> + #include "xfa/fwl/core/cfwl_event.h" #include "xfa/fwl/core/ifwl_timer.h" #include "xfa/fwl/core/ifwl_widget.h" diff --git a/xfa/fwl/core/ifwl_tooltip.cpp b/xfa/fwl/core/ifwl_tooltip.cpp index 82b0fd723b..a9a07c636a 100644 --- a/xfa/fwl/core/ifwl_tooltip.cpp +++ b/xfa/fwl/core/ifwl_tooltip.cpp @@ -6,6 +6,9 @@ #include "xfa/fwl/core/ifwl_tooltip.h" +#include <memory> +#include <utility> + #include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" #include "xfa/fwl/core/cfwl_themebackground.h" @@ -14,7 +17,6 @@ #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fwl/core/ifwl_timerinfo.h" -#include "xfa/fwl/core/ifwl_tooltip.h" #include "xfa/fwl/theme/cfwl_widgettp.h" IFWL_ToolTip::IFWL_ToolTip(const IFWL_App* app, diff --git a/xfa/fwl/core/ifwl_tooltip.h b/xfa/fwl/core/ifwl_tooltip.h index cb3eab1740..71a913010a 100644 --- a/xfa/fwl/core/ifwl_tooltip.h +++ b/xfa/fwl/core/ifwl_tooltip.h @@ -7,6 +7,8 @@ #ifndef XFA_FWL_CORE_IFWL_TOOLTIP_H_ #define XFA_FWL_CORE_IFWL_TOOLTIP_H_ +#include <memory> + #include "xfa/fwl/core/ifwl_form.h" #include "xfa/fwl/core/ifwl_timer.h" diff --git a/xfa/fwl/core/ifwl_widget.cpp b/xfa/fwl/core/ifwl_widget.cpp index 01f9a4d5d4..e9ee2a8715 100644 --- a/xfa/fwl/core/ifwl_widget.cpp +++ b/xfa/fwl/core/ifwl_widget.cpp @@ -7,6 +7,7 @@ #include "xfa/fwl/core/ifwl_widget.h" #include <algorithm> +#include <utility> #include "xfa/fde/tto/fde_textout.h" #include "xfa/fwl/core/cfwl_evtkey.h" @@ -29,7 +30,6 @@ #include "xfa/fwl/core/ifwl_combobox.h" #include "xfa/fwl/core/ifwl_form.h" #include "xfa/fwl/core/ifwl_themeprovider.h" -#include "xfa/fwl/core/ifwl_widget.h" #include "xfa/fxfa/xfa_ffapp.h" #define FWL_STYLEEXT_MNU_Vert (1L << 0) diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp index 80a7b8fe4a..9eb598bc8c 100644 --- a/xfa/fwl/theme/cfwl_widgettp.cpp +++ b/xfa/fwl/theme/cfwl_widgettp.cpp @@ -7,6 +7,7 @@ #include "xfa/fwl/theme/cfwl_widgettp.h" #include <algorithm> +#include <utility> #include "xfa/fde/tto/fde_textout.h" #include "xfa/fgas/font/fgas_gefont.h" diff --git a/xfa/fxbarcode/BC_Library.cpp b/xfa/fxbarcode/BC_Library.cpp index b0b4186735..075bc2247d 100644 --- a/xfa/fxbarcode/BC_Library.cpp +++ b/xfa/fxbarcode/BC_Library.cpp @@ -4,6 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "xfa/fxbarcode/BC_Library.h" + #include <stdint.h> #include "xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h" diff --git a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h index 34e94fb0fd..b71cfb4c06 100644 --- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h +++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h @@ -14,7 +14,7 @@ class CBC_ReedSolomonGF256Poly; class CBC_ReedSolomonEncoder { public: - CBC_ReedSolomonEncoder(CBC_ReedSolomonGF256* field); + explicit CBC_ReedSolomonEncoder(CBC_ReedSolomonGF256* field); virtual ~CBC_ReedSolomonEncoder(); void Encode(CFX_Int32Array* toEncode, int32_t ecBytes, int32_t& e); diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h index 802a49cb5e..90e76ac50a 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h +++ b/xfa/fxbarcode/pdf417/BC_PDF417BarcodeRow.h @@ -11,7 +11,7 @@ class CBC_BarcodeRow { public: - CBC_BarcodeRow(int32_t width); + explicit CBC_BarcodeRow(int32_t width); virtual ~CBC_BarcodeRow(); void set(int32_t x, uint8_t value); diff --git a/xfa/fxfa/app/xfa_ffapp.cpp b/xfa/fxfa/app/xfa_ffapp.cpp index d65a611eb9..3f013487f2 100644 --- a/xfa/fxfa/app/xfa_ffapp.cpp +++ b/xfa/fxfa/app/xfa_ffapp.cpp @@ -7,7 +7,9 @@ #include "xfa/fxfa/xfa_ffapp.h" #include <algorithm> +#include <memory> #include <utility> +#include <vector> #include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fwl/core/cfwl_widgetmgr.h" diff --git a/xfa/fxfa/app/xfa_ffapp_unittest.cpp b/xfa/fxfa/app/xfa_ffapp_unittest.cpp index 7e1b9d7237..10c0545fbb 100644 --- a/xfa/fxfa/app/xfa_ffapp_unittest.cpp +++ b/xfa/fxfa/app/xfa_ffapp_unittest.cpp @@ -5,6 +5,7 @@ #include "xfa/fxfa/xfa_ffapp.h" #include <memory> +#include <vector> #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_stream.h" diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp index 5439b1fe47..3d1ead5069 100644 --- a/xfa/fxfa/app/xfa_ffdoc.cpp +++ b/xfa/fxfa/app/xfa_ffdoc.cpp @@ -7,6 +7,8 @@ #include "xfa/fxfa/xfa_ffdoc.h" #include <algorithm> +#include <memory> +#include <vector> #include "core/fpdfapi/parser/cpdf_array.h" #include "core/fpdfapi/parser/cpdf_document.h" diff --git a/xfa/fxfa/app/xfa_ffnotify.h b/xfa/fxfa/app/xfa_ffnotify.h index d9530a895e..1bfaffec89 100644 --- a/xfa/fxfa/app/xfa_ffnotify.h +++ b/xfa/fxfa/app/xfa_ffnotify.h @@ -14,7 +14,7 @@ class CXFA_FFWidgetHandler; class CXFA_FFNotify { public: - CXFA_FFNotify(CXFA_FFDoc* pDoc); + explicit CXFA_FFNotify(CXFA_FFDoc* pDoc); ~CXFA_FFNotify(); void OnPageEvent(CXFA_ContainerLayoutItem* pSender, uint32_t dwEvent); diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 07ba16cd80..afc2a05f6e 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -8,6 +8,7 @@ #include <algorithm> #include <memory> +#include <vector> #include "core/fpdfapi/page/cpdf_pageobjectholder.h" #include "core/fxcodec/codec/ccodec_progressivedecoder.h" diff --git a/xfa/fxfa/app/xfa_fwltheme.h b/xfa/fxfa/app/xfa_fwltheme.h index 41ddc74c34..630653236f 100644 --- a/xfa/fxfa/app/xfa_fwltheme.h +++ b/xfa/fxfa/app/xfa_fwltheme.h @@ -26,7 +26,7 @@ class CXFA_FWLTheme final : public IFWL_ThemeProvider { public: - CXFA_FWLTheme(CXFA_FFApp* pApp); + explicit CXFA_FWLTheme(CXFA_FFApp* pApp); ~CXFA_FWLTheme() override; // IFWL_ThemeProvider: diff --git a/xfa/fxfa/fm2js/xfa_expression.cpp b/xfa/fxfa/fm2js/xfa_expression.cpp index 4271ae04e2..6895f25438 100644 --- a/xfa/fxfa/fm2js/xfa_expression.cpp +++ b/xfa/fxfa/fm2js/xfa_expression.cpp @@ -6,6 +6,8 @@ #include "xfa/fxfa/fm2js/xfa_expression.h" +#include <utility> + #include "core/fxcrt/fx_basic.h" namespace { diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp index 5c267717a3..4394455c74 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp @@ -8,6 +8,10 @@ #include <time.h> +#include <algorithm> +#include <memory> +#include <vector> + #include "core/fxcrt/fx_ext.h" #include "fxjs/cfxjse_arguments.h" #include "fxjs/cfxjse_class.h" diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.h b/xfa/fxfa/fm2js/xfa_fm2jscontext.h index 0f56c6964c..f6be186c15 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.h +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.h @@ -7,6 +7,8 @@ #ifndef XFA_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ #define XFA_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ +#include <memory> + #include "fxjs/cfxjse_arguments.h" #include "fxjs/cfxjse_context.h" #include "xfa/fxfa/parser/xfa_resolvenode_rs.h" diff --git a/xfa/fxfa/fm2js/xfa_fmparse.cpp b/xfa/fxfa/fm2js/xfa_fmparse.cpp index 530ca85325..a383b2e04a 100644 --- a/xfa/fxfa/fm2js/xfa_fmparse.cpp +++ b/xfa/fxfa/fm2js/xfa_fmparse.cpp @@ -7,6 +7,7 @@ #include "xfa/fxfa/fm2js/xfa_fmparse.h" #include <memory> +#include <utility> CXFA_FMParse::CXFA_FMParse() : m_pToken(nullptr), m_pErrorInfo(0) {} diff --git a/xfa/fxfa/fxfa_widget.h b/xfa/fxfa/fxfa_widget.h index 6e68e841e9..5cdec2dc5c 100644 --- a/xfa/fxfa/fxfa_widget.h +++ b/xfa/fxfa/fxfa_widget.h @@ -7,6 +7,8 @@ #ifndef XFA_FXFA_FXFA_WIDGET_H_ #define XFA_FXFA_FXFA_WIDGET_H_ +#include <memory> + #include "core/fxcrt/fx_coordinates.h" #include "core/fxge/fx_dib.h" #include "xfa/fxfa/parser/cxfa_box.h" diff --git a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp index 6140ad37d8..7493570bc2 100644 --- a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp +++ b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp @@ -6,6 +6,8 @@ #include "xfa/fxfa/parser/cscript_hostpseudomodel.h" +#include <memory> + #include "fxjs/cfxjse_arguments.h" #include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/parser/cxfa_document.h" diff --git a/xfa/fxfa/parser/cxfa_containerlayoutitem.h b/xfa/fxfa/parser/cxfa_containerlayoutitem.h index 87fa360fe2..3c8a8afa22 100644 --- a/xfa/fxfa/parser/cxfa_containerlayoutitem.h +++ b/xfa/fxfa/parser/cxfa_containerlayoutitem.h @@ -11,7 +11,7 @@ class CXFA_ContainerLayoutItem : public CXFA_LayoutItem { public: - CXFA_ContainerLayoutItem(CXFA_Node* pNode); + explicit CXFA_ContainerLayoutItem(CXFA_Node* pNode); CXFA_LayoutProcessor* GetLayout() const; int32_t GetPageIndex() const; diff --git a/xfa/fxfa/parser/cxfa_contentlayoutitem.h b/xfa/fxfa/parser/cxfa_contentlayoutitem.h index f826f52e5b..9ac1dceb42 100644 --- a/xfa/fxfa/parser/cxfa_contentlayoutitem.h +++ b/xfa/fxfa/parser/cxfa_contentlayoutitem.h @@ -11,7 +11,7 @@ class CXFA_ContentLayoutItem : public CXFA_LayoutItem { public: - CXFA_ContentLayoutItem(CXFA_Node* pNode); + explicit CXFA_ContentLayoutItem(CXFA_Node* pNode); ~CXFA_ContentLayoutItem() override; CXFA_ContentLayoutItem* m_pPrev; diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.h b/xfa/fxfa/parser/cxfa_layoutpagemgr.h index dcd798ea1a..3f0410f74c 100644 --- a/xfa/fxfa/parser/cxfa_layoutpagemgr.h +++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.h @@ -14,7 +14,7 @@ class CXFA_LayoutItem; class CXFA_LayoutPageMgr { public: - CXFA_LayoutPageMgr(CXFA_LayoutProcessor* pLayoutProcessor); + explicit CXFA_LayoutPageMgr(CXFA_LayoutProcessor* pLayoutProcessor); ~CXFA_LayoutPageMgr(); bool InitLayoutPage(CXFA_Node* pFormNode); diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.h b/xfa/fxfa/parser/cxfa_layoutprocessor.h index d735b385bd..cf1b1e83b4 100644 --- a/xfa/fxfa/parser/cxfa_layoutprocessor.h +++ b/xfa/fxfa/parser/cxfa_layoutprocessor.h @@ -20,7 +20,7 @@ class IFX_Pause; class CXFA_LayoutProcessor { public: - CXFA_LayoutProcessor(CXFA_Document* pDocument); + explicit CXFA_LayoutProcessor(CXFA_Document* pDocument); ~CXFA_LayoutProcessor(); CXFA_Document* GetDocument() const; diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 1d0f4333f5..18ea41419a 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -8,6 +8,7 @@ #include <map> #include <memory> +#include <utility> #include "core/fxcrt/fx_ext.h" #include "fxjs/cfxjse_value.h" diff --git a/xfa/fxfa/parser/cxfa_nodelist.cpp b/xfa/fxfa/parser/cxfa_nodelist.cpp index 9eb04c994f..cb09833d24 100644 --- a/xfa/fxfa/parser/cxfa_nodelist.cpp +++ b/xfa/fxfa/parser/cxfa_nodelist.cpp @@ -6,6 +6,8 @@ #include "xfa/fxfa/parser/xfa_object.h" +#include <memory> + #include "core/fxcrt/fx_ext.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_scriptcontext.h" diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.h b/xfa/fxfa/parser/cxfa_resolveprocessor.h index 630a54ea3c..2590021cdb 100644 --- a/xfa/fxfa/parser/cxfa_resolveprocessor.h +++ b/xfa/fxfa/parser/cxfa_resolveprocessor.h @@ -17,7 +17,7 @@ class CXFA_ScriptContext; class CXFA_ResolveNodesData { public: - CXFA_ResolveNodesData(CXFA_ScriptContext* pSC = nullptr); + explicit CXFA_ResolveNodesData(CXFA_ScriptContext* pSC = nullptr); ~CXFA_ResolveNodesData(); CXFA_ScriptContext* m_pSC; diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.cpp b/xfa/fxfa/parser/cxfa_scriptcontext.cpp index 80395149a3..8cad0e08c4 100644 --- a/xfa/fxfa/parser/cxfa_scriptcontext.cpp +++ b/xfa/fxfa/parser/cxfa_scriptcontext.cpp @@ -6,6 +6,8 @@ #include "xfa/fxfa/parser/cxfa_scriptcontext.h" +#include <utility> + #include "core/fxcrt/fx_ext.h" #include "fxjs/cfxjse_arguments.h" #include "fxjs/cfxjse_class.h" diff --git a/xfa/fxfa/parser/cxfa_widetextread.cpp b/xfa/fxfa/parser/cxfa_widetextread.cpp index 35d4dc1270..be2de7c9e4 100644 --- a/xfa/fxfa/parser/cxfa_widetextread.cpp +++ b/xfa/fxfa/parser/cxfa_widetextread.cpp @@ -6,6 +6,8 @@ #include "xfa/fxfa/parser/cxfa_widetextread.h" +#include <algorithm> + #include "core/fxcrt/fx_ext.h" #include "xfa/fgas/crt/fgas_codepage.h" diff --git a/xfa/fxfa/parser/cxfa_widetextread.h b/xfa/fxfa/parser/cxfa_widetextread.h index e0f0eac358..3a39061079 100644 --- a/xfa/fxfa/parser/cxfa_widetextread.h +++ b/xfa/fxfa/parser/cxfa_widetextread.h @@ -11,7 +11,7 @@ class CXFA_WideTextRead : public IFX_Stream { public: - CXFA_WideTextRead(const CFX_WideString& wsBuffer); + explicit CXFA_WideTextRead(const CFX_WideString& wsBuffer); // IFX_Stream void Release() override; diff --git a/xfa/fxfa/parser/cxfa_xml_parser.h b/xfa/fxfa/parser/cxfa_xml_parser.h index 1fdf06b5a8..59def4be67 100644 --- a/xfa/fxfa/parser/cxfa_xml_parser.h +++ b/xfa/fxfa/parser/cxfa_xml_parser.h @@ -7,6 +7,8 @@ #ifndef XFA_FXFA_PARSER_CXFA_XML_PARSER_H_ #define XFA_FXFA_PARSER_CXFA_XML_PARSER_H_ +#include <memory> + #include "xfa/fde/xml/fde_xml_imp.h" class IFX_Stream; diff --git a/xfa/fxfa/parser/xfa_locale.h b/xfa/fxfa/parser/xfa_locale.h index 6d03843419..5326f513c1 100644 --- a/xfa/fxfa/parser/xfa_locale.h +++ b/xfa/fxfa/parser/xfa_locale.h @@ -56,7 +56,7 @@ class CXFA_XMLLocale : public IFX_Locale { class CXFA_NodeLocale : public IFX_Locale { public: - CXFA_NodeLocale(CXFA_Node* pLocale); + explicit CXFA_NodeLocale(CXFA_Node* pLocale); ~CXFA_NodeLocale() override; // IFX_Locale diff --git a/xfa/fxfa/parser/xfa_resolvenode_rs.h b/xfa/fxfa/parser/xfa_resolvenode_rs.h index 2e7e297aea..7ad218efe8 100644 --- a/xfa/fxfa/parser/xfa_resolvenode_rs.h +++ b/xfa/fxfa/parser/xfa_resolvenode_rs.h @@ -7,6 +7,8 @@ #ifndef XFA_FXFA_PARSER_XFA_RESOLVENODE_RS_H_ #define XFA_FXFA_PARSER_XFA_RESOLVENODE_RS_H_ +#include <memory> + #include "fxjs/cfxjse_value.h" #include "xfa/fxfa/fxfa.h" #include "xfa/fxfa/parser/cxfa_valuearray.h" diff --git a/xfa/fxfa/parser/xfa_utils.h b/xfa/fxfa/parser/xfa_utils.h index 9a84fd6f67..7981704973 100644 --- a/xfa/fxfa/parser/xfa_utils.h +++ b/xfa/fxfa/parser/xfa_utils.h @@ -26,7 +26,7 @@ bool XFA_FDEExtension_ResolveNamespaceQualifier( template <class NodeType, class TraverseStrategy> class CXFA_NodeIteratorTemplate { public: - CXFA_NodeIteratorTemplate(NodeType* pRootNode = nullptr) + explicit CXFA_NodeIteratorTemplate(NodeType* pRootNode = nullptr) : m_pRoot(pRootNode), m_NodeStack(100) { if (pRootNode) { m_NodeStack.Push(pRootNode); diff --git a/xfa/fxfa/xfa_checksum.h b/xfa/fxfa/xfa_checksum.h index 8f739151f4..aaa587fed0 100644 --- a/xfa/fxfa/xfa_checksum.h +++ b/xfa/fxfa/xfa_checksum.h @@ -24,7 +24,7 @@ class CXFA_SAXContext { class CXFA_SAXReaderHandler { public: - CXFA_SAXReaderHandler(CXFA_ChecksumContext* pContext); + explicit CXFA_SAXReaderHandler(CXFA_ChecksumContext* pContext); ~CXFA_SAXReaderHandler(); CXFA_SAXContext* OnTagEnter(const CFX_ByteStringC& bsTagName, diff --git a/xfa/fxfa/xfa_ffdocview.h b/xfa/fxfa/xfa_ffdocview.h index 31e4df955f..2350978d52 100644 --- a/xfa/fxfa/xfa_ffdocview.h +++ b/xfa/fxfa/xfa_ffdocview.h @@ -37,7 +37,7 @@ enum XFA_DOCVIEW_LAYOUTSTATUS { }; class CXFA_FFDocView { public: - CXFA_FFDocView(CXFA_FFDoc* pDoc); + explicit CXFA_FFDocView(CXFA_FFDoc* pDoc); ~CXFA_FFDocView(); CXFA_FFDoc* GetDoc() { return m_pDoc; } diff --git a/xfa/fxfa/xfa_ffwidgethandler.h b/xfa/fxfa/xfa_ffwidgethandler.h index ccb2f3d630..7335f9d1b6 100644 --- a/xfa/fxfa/xfa_ffwidgethandler.h +++ b/xfa/fxfa/xfa_ffwidgethandler.h @@ -18,7 +18,7 @@ enum class FWL_WidgetHit; class CXFA_FFWidgetHandler { public: - CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView); + explicit CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView); ~CXFA_FFWidgetHandler(); CXFA_FFWidget* CreateWidget(CXFA_FFWidget* hParent, |