summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/include/fxcodec/fx_codec.h9
-rw-r--r--core/src/fpdfapi/fpdf_font/font_int.h12
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp10
-rw-r--r--core/src/fxcrt/extension.h7
-rw-r--r--core/src/fxcrt/fx_extension.cpp4
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.cpp9
7 files changed, 24 insertions, 33 deletions
diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h
index 1c120aa0ab..c1842626f0 100644
--- a/core/include/fxcodec/fx_codec.h
+++ b/core/include/fxcodec/fx_codec.h
@@ -461,7 +461,7 @@ class ICodec_Jbig2Encoder {
};
class ICodec_IccModule {
public:
- typedef enum {
+ enum IccCS {
IccCS_Unknown = 0,
IccCS_XYZ,
IccCS_Lab,
@@ -474,8 +474,9 @@ class ICodec_IccModule {
IccCS_Rgb,
IccCS_Cmyk,
IccCS_Cmy
- } IccCS;
- typedef struct _IccParam {
+ };
+
+ struct IccParam {
FX_DWORD Version;
IccCS ColorSpace;
FX_DWORD dwProfileType;
@@ -483,7 +484,7 @@ class ICodec_IccModule {
uint8_t* pProfileData;
FX_DWORD dwProfileSize;
double Gamma;
- } IccParam;
+ };
virtual ~ICodec_IccModule() {}
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h
index 7ff97e5a77..1d1f006115 100644
--- a/core/src/fpdfapi/fpdf_font/font_int.h
+++ b/core/src/fpdfapi/fpdf_font/font_int.h
@@ -162,18 +162,6 @@ class CPDF_CMap {
CPDF_CMap* m_pUseMap;
};
-typedef struct _FileHeader {
- uint8_t btTag[4];
- uint8_t btVersion;
- uint8_t btFormat;
- uint8_t btReserved1[2];
- FX_DWORD dwStartIndex;
- FX_DWORD dwEndIndex;
- FX_DWORD dwDataSize;
- FX_DWORD dwDataOffset;
- FX_DWORD dwRecordSize;
-} FXMP_FILEHEADER;
-
class CPDF_CID2UnicodeMap {
public:
CPDF_CID2UnicodeMap();
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index ba75753c9a..49fb331a94 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -964,13 +964,15 @@ void CPDF_IndexedCS::EnableStdConversion(FX_BOOL bEnabled) {
m_pBaseCS->EnableStdConversion(bEnabled);
}
}
+
#define MAX_PATTERN_COLORCOMPS 16
-typedef struct _PatternValue {
+struct PatternValue {
CPDF_Pattern* m_pPattern;
CPDF_CountedPattern* m_pCountedPattern;
int m_nComps;
FX_FLOAT m_Comps[MAX_PATTERN_COLORCOMPS];
-} PatternValue;
+};
+
CPDF_PatternCS::~CPDF_PatternCS() {
CPDF_ColorSpace* pCS = m_pCountedBaseCS ? m_pCountedBaseCS->get() : NULL;
if (pCS && m_pDocument) {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
index 61becaee6a..799e748761 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
@@ -60,12 +60,12 @@ CPDF_CryptoHandler* CPDF_StandardSecurityHandler::CreateCryptoHandler() {
return new CPDF_StandardCryptoHandler;
}
-typedef struct _PDF_CRYPTOITEM {
+struct PDF_CRYPTOITEM {
int32_t m_Cipher;
int32_t m_KeyLen;
FX_BOOL m_bChecked;
CPDF_StandardCryptoHandler* m_pCryptoHandler;
-} PDF_CRYPTOITEM;
+};
CPDF_StandardSecurityHandler::CPDF_StandardSecurityHandler() {
m_Version = 0;
@@ -775,12 +775,14 @@ void CPDF_StandardCryptoHandler::CryptBlock(FX_BOOL bEncrypt,
CRYPT_ArcFourCryptBlock(dest_buf, dest_size, realkey, realkeylen);
}
}
-typedef struct _AESCryptContext {
+
+struct AESCryptContext {
uint8_t m_Context[2048];
FX_BOOL m_bIV;
uint8_t m_Block[16];
FX_DWORD m_BlockOffset;
-} AESCryptContext;
+};
+
void* CPDF_StandardCryptoHandler::CryptStart(FX_DWORD objnum,
FX_DWORD gennum,
FX_BOOL bEncrypt) {
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index 6e799eb3a4..5ce29ddd50 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -315,16 +315,15 @@ extern "C" {
#define MT_Matrix_A 0x9908b0df
#define MT_Upper_Mask 0x80000000
#define MT_Lower_Mask 0x7fffffff
-typedef struct _FX_MTRANDOMCONTEXT {
- _FX_MTRANDOMCONTEXT() {
+struct FX_MTRANDOMCONTEXT {
+ FX_MTRANDOMCONTEXT() {
mti = MT_N + 1;
bHaveSeed = FALSE;
}
FX_DWORD mti;
FX_BOOL bHaveSeed;
FX_DWORD mt[MT_N];
-} FX_MTRANDOMCONTEXT, *FX_LPMTRANDOMCONTEXT;
-typedef FX_MTRANDOMCONTEXT const* FX_LPCMTRANDOMCONTEXT;
+};
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
FX_BOOL FX_GenerateCryptoRandom(FX_DWORD* pBuffer, int32_t iCount);
#endif
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
index cae1763c7e..456e6bd7f3 100644
--- a/core/src/fxcrt/fx_extension.cpp
+++ b/core/src/fxcrt/fx_extension.cpp
@@ -259,7 +259,7 @@ FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr,
}
void* FX_Random_MT_Start(FX_DWORD dwSeed) {
- FX_LPMTRANDOMCONTEXT pContext = FX_Alloc(FX_MTRANDOMCONTEXT, 1);
+ FX_MTRANDOMCONTEXT* pContext = FX_Alloc(FX_MTRANDOMCONTEXT, 1);
pContext->mt[0] = dwSeed;
FX_DWORD& i = pContext->mti;
FX_DWORD* pBuf = pContext->mt;
@@ -271,7 +271,7 @@ void* FX_Random_MT_Start(FX_DWORD dwSeed) {
}
FX_DWORD FX_Random_MT_Generate(void* pContext) {
FXSYS_assert(pContext);
- FX_LPMTRANDOMCONTEXT pMTC = (FX_LPMTRANDOMCONTEXT)pContext;
+ FX_MTRANDOMCONTEXT* pMTC = static_cast<FX_MTRANDOMCONTEXT*>(pContext);
FX_DWORD v;
static FX_DWORD mag[2] = {0, MT_Matrix_A};
FX_DWORD& mti = pMTC->mti;
diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp
index ce3b80506d..9c36e6c99f 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/src/fxge/android/fpf_skiafontmgr.cpp
@@ -37,11 +37,10 @@ static void FPF_SkiaStream_Close(FXFT_Stream stream) {}
#ifdef __cplusplus
};
#endif
-typedef struct _FPF_SKIAFONTMAP {
+struct FPF_SKIAFONTMAP {
FX_DWORD dwFamily;
FX_DWORD dwSubSt;
-} FPF_SKIAFONTMAP, *FPF_LPSKIAFONTMAP;
-typedef FPF_SKIAFONTMAP const* FPF_LPCSKIAFONTMAP;
+};
static const FPF_SKIAFONTMAP g_SkiaFontmap[] = {
{0x58c5083, 0xc8d2e345}, {0x5dfade2, 0xe1633081},
{0x684317d, 0xe1633081}, {0x14ee2d13, 0xc8d2e345},
@@ -60,7 +59,7 @@ FX_DWORD FPF_SkiaGetSubstFont(FX_DWORD dwHash) {
int32_t iEnd = sizeof(g_SkiaFontmap) / sizeof(FPF_SKIAFONTMAP);
while (iStart <= iEnd) {
int32_t iMid = (iStart + iEnd) / 2;
- FPF_LPCSKIAFONTMAP pItem = &g_SkiaFontmap[iMid];
+ const FPF_SKIAFONTMAP* pItem = &g_SkiaFontmap[iMid];
if (dwHash < pItem->dwFamily) {
iEnd = iMid - 1;
} else if (dwHash > pItem->dwFamily) {
@@ -81,7 +80,7 @@ FX_DWORD FPF_SkiaGetSansFont(FX_DWORD dwHash) {
int32_t iEnd = sizeof(g_SkiaSansFontMap) / sizeof(FPF_SKIAFONTMAP);
while (iStart <= iEnd) {
int32_t iMid = (iStart + iEnd) / 2;
- FPF_LPCSKIAFONTMAP pItem = &g_SkiaSansFontMap[iMid];
+ const FPF_SKIAFONTMAP* pItem = &g_SkiaSansFontMap[iMid];
if (dwHash < pItem->dwFamily) {
iEnd = iMid - 1;
} else if (dwHash > pItem->dwFamily) {