From d21cddaa7548584bfcebefe9a03e857fee3a846b Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 23 Feb 2016 10:11:11 -0800 Subject: Remove many _CAPS structure names. They're technically not allowed because they are reserved for the preprocessor. Also get rid of LPC* typedefs along the way. Also provide a header for a data file containing many instance of these found along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1722873002 . --- core/src/fxcrt/extension.h | 7 +++---- core/src/fxcrt/fx_extension.cpp | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'core/src/fxcrt') 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(pContext); FX_DWORD v; static FX_DWORD mag[2] = {0, MT_Matrix_A}; FX_DWORD& mti = pMTC->mti; -- cgit v1.2.3