diff options
author | Lei Zhang <thestig@chromium.org> | 2018-09-20 01:21:05 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-09-20 01:21:05 +0000 |
commit | 109aa6d0f673aee11a398aae478fb758fc73a33f (patch) | |
tree | 0ec791dcb33395953b5afb8b667b0a1823daa789 /core | |
parent | f3cc72fd2b6910d4d7437f71efce23b501c5b526 (diff) | |
download | pdfium-109aa6d0f673aee11a398aae478fb758fc73a33f.tar.xz |
Remove more unneeded STL #includes from headers.
Remove some variables named "string" to avoid false positives from the
linter.
Change-Id: I00a53e6970451fd0cea8ab2f8178183650ca00d2
Reviewed-on: https://pdfium-review.googlesource.com/42810
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/font/cpdf_fontglobals.h | 1 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_simple_parser.h | 2 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_syntax_parser.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_syntax_parser.h | 3 | ||||
-rw-r--r-- | core/fxcrt/cfx_seekablestreamproxy.h | 2 | ||||
-rw-r--r-- | core/fxcrt/css/cfx_cssdeclaration.h | 1 | ||||
-rw-r--r-- | core/fxcrt/fileaccess_iface.h | 1 | ||||
-rw-r--r-- | core/fxcrt/maybe_owned.h | 1 | ||||
-rw-r--r-- | core/fxcrt/string_view_template.h | 1 | ||||
-rw-r--r-- | core/fxcrt/xml/cfx_xmlparser.cpp | 1 | ||||
-rw-r--r-- | core/fxcrt/xml/cfx_xmlparser.h | 1 |
11 files changed, 6 insertions, 12 deletions
diff --git a/core/fpdfapi/font/cpdf_fontglobals.h b/core/fpdfapi/font/cpdf_fontglobals.h index d5156aae65..0e2985f312 100644 --- a/core/fpdfapi/font/cpdf_fontglobals.h +++ b/core/fpdfapi/font/cpdf_fontglobals.h @@ -9,7 +9,6 @@ #include <map> #include <memory> -#include <utility> #include "core/fpdfapi/cmaps/cmap_int.h" #include "core/fpdfapi/font/cfx_stockfontarray.h" diff --git a/core/fpdfapi/parser/cpdf_simple_parser.h b/core/fpdfapi/parser/cpdf_simple_parser.h index c8dae23ba6..f9461b644c 100644 --- a/core/fpdfapi/parser/cpdf_simple_parser.h +++ b/core/fpdfapi/parser/cpdf_simple_parser.h @@ -7,8 +7,6 @@ #ifndef CORE_FPDFAPI_PARSER_CPDF_SIMPLE_PARSER_H_ #define CORE_FPDFAPI_PARSER_CPDF_SIMPLE_PARSER_H_ -#include <utility> - #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" #include "third_party/base/span.h" diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp index cc83fa091a..45e0f1730b 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp +++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp @@ -403,6 +403,10 @@ ByteString CPDF_SyntaxParser::GetKeyword() { return GetNextWord(nullptr); } +void CPDF_SyntaxParser::SetPos(FX_FILESIZE pos) { + m_Pos = std::min(pos, m_FileLen); +} + std::unique_ptr<CPDF_Object> CPDF_SyntaxParser::GetObjectBody( CPDF_IndirectObjectHolder* pObjList) { const CPDF_ReadValidator::Session read_session(GetValidator().Get()); diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.h b/core/fpdfapi/parser/cpdf_syntax_parser.h index 92f28d9874..6e6b98c068 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.h +++ b/core/fpdfapi/parser/cpdf_syntax_parser.h @@ -7,7 +7,6 @@ #ifndef CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_ #define CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_ -#include <algorithm> #include <memory> #include <vector> @@ -42,7 +41,7 @@ class CPDF_SyntaxParser { } FX_FILESIZE GetPos() const { return m_Pos; } - void SetPos(FX_FILESIZE pos) { m_Pos = std::min(pos, m_FileLen); } + void SetPos(FX_FILESIZE pos); std::unique_ptr<CPDF_Object> GetObjectBody( CPDF_IndirectObjectHolder* pObjList); diff --git a/core/fxcrt/cfx_seekablestreamproxy.h b/core/fxcrt/cfx_seekablestreamproxy.h index b193b1801a..42123fd88c 100644 --- a/core/fxcrt/cfx_seekablestreamproxy.h +++ b/core/fxcrt/cfx_seekablestreamproxy.h @@ -7,8 +7,6 @@ #ifndef CORE_FXCRT_CFX_SEEKABLESTREAMPROXY_H_ #define CORE_FXCRT_CFX_SEEKABLESTREAMPROXY_H_ -#include <algorithm> - #include "core/fxcrt/fx_stream.h" #include "core/fxcrt/fx_system.h" #include "core/fxcrt/retain_ptr.h" diff --git a/core/fxcrt/css/cfx_cssdeclaration.h b/core/fxcrt/css/cfx_cssdeclaration.h index 8d67bb7944..5092da438a 100644 --- a/core/fxcrt/css/cfx_cssdeclaration.h +++ b/core/fxcrt/css/cfx_cssdeclaration.h @@ -8,7 +8,6 @@ #define CORE_FXCRT_CSS_CFX_CSSDECLARATION_H_ #include <memory> -#include <utility> #include <vector> #include "core/fxcrt/css/cfx_cssdata.h" diff --git a/core/fxcrt/fileaccess_iface.h b/core/fxcrt/fileaccess_iface.h index c438f9ec47..210080e438 100644 --- a/core/fxcrt/fileaccess_iface.h +++ b/core/fxcrt/fileaccess_iface.h @@ -7,7 +7,6 @@ #ifndef CORE_FXCRT_FILEACCESS_IFACE_H_ #define CORE_FXCRT_FILEACCESS_IFACE_H_ -#include <algorithm> #include <memory> #include "core/fxcrt/fx_safe_types.h" diff --git a/core/fxcrt/maybe_owned.h b/core/fxcrt/maybe_owned.h index ac3a81d47e..511e63223b 100644 --- a/core/fxcrt/maybe_owned.h +++ b/core/fxcrt/maybe_owned.h @@ -5,7 +5,6 @@ #ifndef CORE_FXCRT_MAYBE_OWNED_H_ #define CORE_FXCRT_MAYBE_OWNED_H_ -#include <algorithm> #include <memory> #include <utility> diff --git a/core/fxcrt/string_view_template.h b/core/fxcrt/string_view_template.h index d774e3f4bd..e459f2d275 100644 --- a/core/fxcrt/string_view_template.h +++ b/core/fxcrt/string_view_template.h @@ -10,7 +10,6 @@ #include <algorithm> #include <iterator> #include <type_traits> -#include <utility> #include <vector> #include "core/fxcrt/fx_system.h" diff --git a/core/fxcrt/xml/cfx_xmlparser.cpp b/core/fxcrt/xml/cfx_xmlparser.cpp index d66d980f38..97ba90d0fe 100644 --- a/core/fxcrt/xml/cfx_xmlparser.cpp +++ b/core/fxcrt/xml/cfx_xmlparser.cpp @@ -9,6 +9,7 @@ #include <algorithm> #include <cwctype> #include <iterator> +#include <stack> #include <utility> #include "core/fxcrt/cfx_seekablestreamproxy.h" diff --git a/core/fxcrt/xml/cfx_xmlparser.h b/core/fxcrt/xml/cfx_xmlparser.h index 4d9184de3e..466968054b 100644 --- a/core/fxcrt/xml/cfx_xmlparser.h +++ b/core/fxcrt/xml/cfx_xmlparser.h @@ -8,7 +8,6 @@ #define CORE_FXCRT_XML_CFX_XMLPARSER_H_ #include <memory> -#include <stack> #include <vector> #include "core/fxcrt/fx_string.h" |