From 0570b8a2869691c6d5832154c08b9bccfa9a8092 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 6 Apr 2015 13:49:25 -0700 Subject: Merge to XFA: Fix IWYU in fxcrt headers. Note: new includes for XFA Original Review URL: https://codereview.chromium.org/1064433005 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1062843003 --- core/include/fxcrt/fx_arb.h | 4 ++++ core/include/fxcrt/fx_basic.h | 13 +++---------- core/include/fxcrt/fx_coordinates.h | 3 +++ core/include/fxcrt/fx_ext.h | 20 +++++--------------- core/include/fxcrt/fx_memory.h | 4 ++-- core/include/fxcrt/fx_stream.h | 5 +++-- core/include/fxcrt/fx_string.h | 3 +++ core/include/fxcrt/fx_ucd.h | 3 +++ core/include/fxcrt/fx_xml.h | 4 ++-- 9 files changed, 28 insertions(+), 31 deletions(-) diff --git a/core/include/fxcrt/fx_arb.h b/core/include/fxcrt/fx_arb.h index a1dc231a8d..e61c0cc456 100644 --- a/core/include/fxcrt/fx_arb.h +++ b/core/include/fxcrt/fx_arb.h @@ -6,6 +6,10 @@ #ifndef _FX_ARABIC_ #define _FX_ARABIC_ + +#include "fx_system.h" +#include "fx_ucd.h" + class IFX_ArabicChar; class IFX_BidiChar; #ifdef __cplusplus diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index d8618f4a09..33d5881c6a 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -6,18 +6,11 @@ #ifndef _FX_BASIC_H_ #define _FX_BASIC_H_ -#ifndef _FX_SYSTEM_H_ -#include "fx_system.h" -#endif -#ifndef _FX_MEMORY_H_ + #include "fx_memory.h" -#endif -#ifndef _FX_STRING_H_ -#include "fx_string.h" -#endif -#ifndef _FX_STREAM_H_ #include "fx_stream.h" -#endif +#include "fx_string.h" +#include "fx_system.h" // The FX_ArraySize(arr) macro returns the # of elements in an array arr. // The expression is a compile-time constant, and therefore can be diff --git a/core/include/fxcrt/fx_coordinates.h b/core/include/fxcrt/fx_coordinates.h index 15d3a642e8..a9afc5712e 100644 --- a/core/include/fxcrt/fx_coordinates.h +++ b/core/include/fxcrt/fx_coordinates.h @@ -6,6 +6,9 @@ #ifndef _FXCRT_COORDINATES_ #define _FXCRT_COORDINATES_ + +#include "fx_basic.h" + template class CFX_PSVTemplate; template class CFX_VTemplate; template class CFX_PRLTemplate; diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h index ceba015b59..c9c4447be3 100644 --- a/core/include/fxcrt/fx_ext.h +++ b/core/include/fxcrt/fx_ext.h @@ -6,26 +6,17 @@ #ifndef _FXCRT_EXTENSION_ #define _FXCRT_EXTENSION_ -#ifndef _FX_BASIC_H_ + +#include "fx_arb.h" #include "fx_basic.h" -#endif -#ifndef _FXCRT_COORDINATES_ #include "fx_coordinates.h" -#endif -#ifndef _FX_XML_H_ -#include "fx_xml.h" -#endif -#ifndef _FX_UNICODE_ #include "fx_ucd.h" -#endif -#ifndef _FX_ARABIC_ -#include "fx_arb.h" -#endif +#include "fx_xml.h" + #ifdef __cplusplus extern "C" { #endif - FX_FLOAT FXSYS_tan(FX_FLOAT a); FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x); FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, FX_INT32 iLength = -1, FX_INT32 *pUsedLen = NULL); @@ -33,6 +24,7 @@ FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, FX_INT32 iLength = -1, FX_INT32 *pUsed FX_LPWSTR FXSYS_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count); FX_INT32 FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count); FX_INT32 FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count); + inline FX_BOOL FXSYS_islower(FX_INT32 ch) { return ch >= 'a' && ch <= 'z'; @@ -50,8 +42,6 @@ inline FX_INT32 FXSYS_toupper(FX_INT32 ch) return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); } - - FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, FX_INT32 iLength, FX_BOOL bIgnoreCase = FALSE); FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, FX_INT32 iLength, FX_BOOL bIgnoreCase = FALSE); diff --git a/core/include/fxcrt/fx_memory.h b/core/include/fxcrt/fx_memory.h index cb71c04fca..15dc7da8cf 100644 --- a/core/include/fxcrt/fx_memory.h +++ b/core/include/fxcrt/fx_memory.h @@ -6,9 +6,9 @@ #ifndef _FX_MEMORY_H_ #define _FX_MEMORY_H_ -#ifndef _FX_SYSTEM_H_ + #include "fx_system.h" -#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/core/include/fxcrt/fx_stream.h b/core/include/fxcrt/fx_stream.h index ff8344dd68..c23c71d15b 100644 --- a/core/include/fxcrt/fx_stream.h +++ b/core/include/fxcrt/fx_stream.h @@ -6,9 +6,10 @@ #ifndef _FX_STREAM_H_ #define _FX_STREAM_H_ -#ifndef _FX_MEMORY_H_ + #include "fx_memory.h" -#endif +#include "fx_string.h" + void* FX_OpenFolder(FX_LPCSTR path); void* FX_OpenFolder(FX_LPCWSTR path); FX_BOOL FX_GetNextFile(void* handle, CFX_ByteString& filename, FX_BOOL& bFolder); diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h index e4546a0b7c..ad1d083323 100644 --- a/core/include/fxcrt/fx_string.h +++ b/core/include/fxcrt/fx_string.h @@ -6,6 +6,9 @@ #ifndef _FX_STRING_H_ #define _FX_STRING_H_ + +#include "fx_memory.h" + class CFX_ByteStringC; class CFX_ByteString; class CFX_WideStringC; diff --git a/core/include/fxcrt/fx_ucd.h b/core/include/fxcrt/fx_ucd.h index c87e459aa5..0b0f7b8051 100644 --- a/core/include/fxcrt/fx_ucd.h +++ b/core/include/fxcrt/fx_ucd.h @@ -6,6 +6,9 @@ #ifndef _FX_UNICODE_ #define _FX_UNICODE_ + +#include "fx_basic.h" + enum FX_CHARBREAKPROP { FX_CBP_OP = 0, FX_CBP_CL = 1, diff --git a/core/include/fxcrt/fx_xml.h b/core/include/fxcrt/fx_xml.h index fb46a93591..8fb00158a7 100644 --- a/core/include/fxcrt/fx_xml.h +++ b/core/include/fxcrt/fx_xml.h @@ -6,9 +6,9 @@ #ifndef _FX_XML_H_ #define _FX_XML_H_ -#ifndef _FX_BASIC_H_ + #include "fx_basic.h" -#endif + class CXML_AttrItem : public CFX_Object { public: -- cgit v1.2.3