Fixup lint flags.
The -build/include setting was masking out build/include_what_you_use. This CL
restores them, fixes any build errors, and adds NOLINT as needed. As well,
the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd.
lint cleanups
Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f
Reviewed-on: https://pdfium-review.googlesource.com/2030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 0f93697..5ad2f54 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -12,19 +12,13 @@
# 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 bc54a9b..57c2666 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 b681edf..bf1fac4 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 a867409..07f0bd9 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 48a9679..2c37014 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 2143ddb..a29d971 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 a52d97f..9726fa2 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 ce5424e..aee7617 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 3b0b439..e19ffaf 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 0973cb6..64010e1 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 866e961..4677728 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 808f9ee..afebc29 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 0f10ceb..809b23f 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 1fd13a1..59154d3 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 d1183eb..efb9f84 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 9ecc051..a56d64f 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 6aac24e..61318d4 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 df985b9..4f8420f 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 0a8f187..85a78e5 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 93bab00..5597142 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 c638b8a..0ff6985 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 f9127a2..9fc9c1a 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 303f0fc..c2c3705 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 130115b..daf9341 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 377a360..00365c7 100644
--- a/core/fpdfdoc/cpdf_interform.cpp
+++ b/core/fpdfdoc/cpdf_interform.cpp
@@ -364,6 +364,7 @@
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 5fe8c01..5cc7e9b 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 3d3fe74..8d20894 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 775ebfb..873b52a 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 bb46da4..fa16356 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 cd6cf6a..c87d965 100644
--- a/core/fxcrt/cfx_shared_copy_on_write.h
+++ b/core/fxcrt/cfx_shared_copy_on_write.h
@@ -56,6 +56,7 @@
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 4a3dae7..3bfcc91 100644
--- a/core/fxcrt/cfx_string_c_template.h
+++ b/core/fxcrt/cfx_string_c_template.h
@@ -24,6 +24,7 @@
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 @@
// 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 f679696..43ae5b8 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 @@
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 9c8b4e1..9034398 100644
--- a/core/fxcrt/fx_basic.h
+++ b/core/fxcrt/fx_basic.h
@@ -455,7 +455,7 @@
};
public:
- CFX_MapPtrToPtr(int nBlockSize = 10);
+ explicit CFX_MapPtrToPtr(int nBlockSize = 10);
~CFX_MapPtrToPtr();
int GetCount() const { return m_nCount; }
@@ -554,7 +554,7 @@
};
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 f314c65..503e684 100644
--- a/core/fxcrt/fx_basic_bstring_unittest.cpp
+++ b/core/fxcrt/fx_basic_bstring_unittest.cpp
@@ -649,6 +649,7 @@
{
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 @@
{
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 b7fd6f6..7d8529e 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 0a378f3..39bf028 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 0b6d806..540c0c4 100644
--- a/core/fxcrt/fx_string.h
+++ b/core/fxcrt/fx_string.h
@@ -41,7 +41,9 @@
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 @@
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 6c6e617..a7375b9 100644
--- a/core/fxcrt/fx_xml.h
+++ b/core/fxcrt/fx_xml.h
@@ -66,7 +66,7 @@
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 e1a209a..3391086 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 3634d96..e341e8c 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 7c3cb04..c05aea3 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 60528ba..44ed0b2 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 fa3bc02..96630a7 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 5eac2ac..f5ae563 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 9c91c74..63db7ad 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 e2b9523..b938d64 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 c0d2041..6bb4bde 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 @@
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 942814b..cbaa07e 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 9ccccbc..776a373 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 b778031..b857090 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 2a4d243..58cee06 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 1d1ebca..64f647e 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 a4ce6b7..1013527 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 f8c36d8..7ac4fad 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 640a11a..1ab0ab6 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 d525c47..973c4f2 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 bbbbdaa..f2576a8 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 a447034..cc842ba 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 70c6e0a..6b612b2 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 b7afbbc..b4e11ca 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 4c5d10d..9f35d56 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 cc95c1b..c226a31 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 6db768a..1b62dc4 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 401b3e4..01d9124 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 1616093..d7f1f97 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 34b5993..1f96b89 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 c864b82..18a1d61 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 @@
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 c904324..89b8b58 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 ce195ad..629e596 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 46168c8..198ef8a 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 e712edb..65e52fe 100644
--- a/fpdfsdk/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/fpdfview_embeddertest.cpp
@@ -97,6 +97,7 @@
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 b239d70..7945786 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 98161e2..2cd2b43 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
@@ -29,7 +29,7 @@
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 8909cf6..a7d41a8 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
@@ -15,7 +15,7 @@
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 5b0b414..9f529fc 100644
--- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h
+++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h
@@ -17,7 +17,7 @@
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 f025705..38d1957 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 fb0e637..8cfcfa7 100644
--- a/fpdfsdk/javascript/JS_EventHandler.h
+++ b/fpdfsdk/javascript/JS_EventHandler.h
@@ -60,7 +60,7 @@
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 580cb46..68d929f 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 1daee4d..96148d8 100644
--- a/fpdfsdk/javascript/JS_Runtime_Stub.cpp
+++ b/fpdfsdk/javascript/JS_Runtime_Stub.cpp
@@ -120,7 +120,7 @@
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 2b40de0..80c952d 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 32e2aaf..e8c7241 100644
--- a/fpdfsdk/javascript/app.h
+++ b/fpdfsdk/javascript/app.h
@@ -18,7 +18,7 @@
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 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 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 ab56cac..9ea4d63 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 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 4f18980..069a81d 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 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 d70b578..6719494 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 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 c0eb444..9a6568b 100644
--- a/fpdfsdk/javascript/global.h
+++ b/fpdfsdk/javascript/global.h
@@ -32,7 +32,7 @@
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 0773472..fef2369 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 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 efcf0c8..80763d1 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 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 344d25b..3ff5cc6 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 fbf5ee0..47ef193 100644
--- a/fpdfsdk/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/pdfwindow/PWL_FontMap.h
@@ -30,7 +30,7 @@
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 290b876..6db4ecb 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 @@
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 19e5151..bcfb0a6 100644
--- a/fpdfsdk/pdfwindow/PWL_ScrollBar.h
+++ b/fpdfsdk/pdfwindow/PWL_ScrollBar.h
@@ -117,7 +117,7 @@
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 eb6b3cc..713a193 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 644e81a..fd97b57 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 adf6f2a..0dd4158 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 4f5cfbc..b8df9ce 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 5599171..2413e2b 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 206dc37..9d2229c 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 47fdf9e..dabdbed 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 2f7d7dd..3465878 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 8d64180..c1e354e 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 e11f85c..ada87d3 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 8d2f1a4..591484a 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 532494e..d9c8300 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 ffc812d..0c3d501 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 44520a5..c34e2bc 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 0d90bdd..7c1b318 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 d75aa19..a0edfff 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 2bf574b..5c24152 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 569df2a..66271fc 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 6d36eb3..b01081e 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 4322708..c536aaf 100644
--- a/xfa/fde/cfde_txtedtbufiter.h
+++ b/xfa/fde/cfde_txtedtbufiter.h
@@ -14,7 +14,7 @@
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 e0e7881..ad20b04 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 6e6a664..244add4 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 04fc32f..48b45a4 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 28a482b..2f91c13 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 8ef3885..0096b7a 100644
--- a/xfa/fde/css/fde_cssstyleselector.h
+++ b/xfa/fde/css/fde_cssstyleselector.h
@@ -353,7 +353,7 @@
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 0fe6347..7d3ec98 100644
--- a/xfa/fde/css/fde_cssstylesheet.h
+++ b/xfa/fde/css/fde_cssstylesheet.h
@@ -96,7 +96,7 @@
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 4adfd54..2541936 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 f0d0bca..e5bcb0a 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 0cccdc7..9625f95 100644
--- a/xfa/fgas/crt/fgas_memory.cpp
+++ b/xfa/fgas/crt/fgas_memory.cpp
@@ -25,7 +25,7 @@
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 5565733..c7bc45f 100644
--- a/xfa/fgas/crt/fgas_utils.h
+++ b/xfa/fgas/crt/fgas_utils.h
@@ -33,7 +33,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 e42d2a5..1830850 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 f571365..7b68525 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 7baafef..afe628f 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 4e9238f..7bae6cd 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -160,7 +160,7 @@
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_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 3383d45..d3ea9fa 100644
--- a/xfa/fgas/localization/fgas_datetime.h
+++ b/xfa/fgas/localization/fgas_datetime.h
@@ -30,7 +30,7 @@
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 @@
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 68fd94e..aea7bac 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 @@
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 a3272b4..f15766d 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 @@
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 0f931d9..faedf5b 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 0163da9..7d839f7 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 492e53f..c7cd743 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 c2407ed..0c8ac47 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 d2a1f20..71c52d9 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 ff28cdc..de2540d 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 c617ac1..5a4054c 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 b5cbd14..739c431 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 c913eae..0768701 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 7fe3501..0463da1 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 ffcf5b3..47eab2a 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 7cd2ca3..39d86fa 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 9172d79..6623e8f 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 cadba3f..83e54f1 100644
--- a/xfa/fwl/core/cfwl_widgetproperties.h
+++ b/xfa/fwl/core/cfwl_widgetproperties.h
@@ -18,7 +18,7 @@
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 857fdfb..8b9a723 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 ec7855d..5a530ed 100644
--- a/xfa/fwl/core/fwl_noteimp.h
+++ b/xfa/fwl/core/fwl_noteimp.h
@@ -95,7 +95,7 @@
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 d055a4b..e4084aa 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 cba6c44..b7607e3 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 1f053db..0d18e2c 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 b947e95..30d9b63 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 12e009f..b85f4e4 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 7cf17e2..db5b067 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 03bfca2..f454f4c 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 7ff5623..3425005 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 965ba00..07fe515 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 c7d2e10..21b9cf9 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 deaab78..e3ddcd0 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 ff479cb..360bc20 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 6362097..a996dc1 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 7174550..a814796 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 8d5d6cf..dca32c3 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 c8d70f5..9d7b83a 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 c3b0be0..d129e70 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 a46245e..04288a5 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 57e2507..f89261d 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 1bdc002..0e85d98 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 b86d609..bd2fe89 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 785f5a3..a1646e2 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 ab9cbc4..3d7dbf5 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 7a8b312..f2c072e 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 38685f7..f1bec51 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 5036cf9..d303992 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 23f141b..b189493 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 8651aa0..a3fa8da 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 54b3f21..9d5f7a6 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 ac19a30..148abf9 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 a12c7bb..fa063d6 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 e2fda86..bc4f3ab 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 82b0fd7..a9a07c6 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 cb3eab1..71a9130 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 01f9a4d..e9ee2a8 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 80a7b8f..9eb598b 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 b0b4186..075bc22 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 34e94fb..b71cfb4 100644
--- a/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h
+++ b/xfa/fxbarcode/common/reedsolomon/BC_ReedSolomon.h
@@ -14,7 +14,7 @@
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 802a49c..90e76ac 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 d65a611..3f01348 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 7e1b9d7..10c0545 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 5439b1f..3d1ead5 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 d9530a8..1bfaffe 100644
--- a/xfa/fxfa/app/xfa_ffnotify.h
+++ b/xfa/fxfa/app/xfa_ffnotify.h
@@ -14,7 +14,7 @@
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 07ba16c..afc2a05 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 41ddc74..6306532 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 4271ae0..6895f25 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 5c26771..4394455 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 0f56c69..f6be186 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 530ca85..a383b2e 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 6e68e84..5cdec2d 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 6140ad3..7493570 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 87fa360..3c8a8af 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 f826f52..9ac1dce 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 dcd798e..3f0410f 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.h
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.h
@@ -14,7 +14,7 @@
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 d735b38..cf1b1e8 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.h
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.h
@@ -20,7 +20,7 @@
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 1d0f433..18ea414 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 9eb04c9..cb09833 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 630a54e..2590021 100644
--- a/xfa/fxfa/parser/cxfa_resolveprocessor.h
+++ b/xfa/fxfa/parser/cxfa_resolveprocessor.h
@@ -17,7 +17,7 @@
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 8039514..8cad0e0 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 35d4dc1..be2de7c 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 e0f0eac..3a39061 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 1fdf06b..59def4b 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 6d03843..5326f51 100644
--- a/xfa/fxfa/parser/xfa_locale.h
+++ b/xfa/fxfa/parser/xfa_locale.h
@@ -56,7 +56,7 @@
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 2e7e297..7ad218e 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 9a84fd6..7981704 100644
--- a/xfa/fxfa/parser/xfa_utils.h
+++ b/xfa/fxfa/parser/xfa_utils.h
@@ -26,7 +26,7 @@
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 8f73915..aaa587f 100644
--- a/xfa/fxfa/xfa_checksum.h
+++ b/xfa/fxfa/xfa_checksum.h
@@ -24,7 +24,7 @@
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 31e4df9..2350978 100644
--- a/xfa/fxfa/xfa_ffdocview.h
+++ b/xfa/fxfa/xfa_ffdocview.h
@@ -37,7 +37,7 @@
};
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 ccb2f3d..7335f9d 100644
--- a/xfa/fxfa/xfa_ffwidgethandler.h
+++ b/xfa/fxfa/xfa_ffwidgethandler.h
@@ -18,7 +18,7 @@
class CXFA_FFWidgetHandler {
public:
- CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView);
+ explicit CXFA_FFWidgetHandler(CXFA_FFDocView* pDocView);
~CXFA_FFWidgetHandler();
CXFA_FFWidget* CreateWidget(CXFA_FFWidget* hParent,