diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-11 12:05:04 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-11 12:05:04 -0700 |
commit | 677b8fffb0c76c009ad808ed91a27738e5420254 (patch) | |
tree | 3cf9937569b7ca0cb93b6dfd04ac854f414f9d36 /core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp | |
parent | 2b5e0d5b20654d116045484868c9e015ed698124 (diff) | |
download | pdfium-677b8fffb0c76c009ad808ed91a27738e5420254.tar.xz |
Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.
At one point in time, it may have made sense to indicate the
expected alignment of the memory you're about to copy, but that
was last century. The compiler will take care of it just fine.
I stopped short of removing the FXSYS_ wrapper macros entirely.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1179693003.
Diffstat (limited to 'core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp')
-rw-r--r-- | core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp index 8752acf536..178db75cf8 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp @@ -61,7 +61,7 @@ CPDF_ClipPathData::CPDF_ClipPathData(const CPDF_ClipPathData& src) m_pPathList[i] = src.m_pPathList[i]; } m_pTypeList = FX_Alloc(uint8_t, alloc_size); - FXSYS_memcpy32(m_pTypeList, src.m_pTypeList, m_PathCount); + FXSYS_memcpy(m_pTypeList, src.m_pTypeList, m_PathCount); } else { m_pPathList = NULL; m_pTypeList = NULL; @@ -156,7 +156,7 @@ void CPDF_ClipPath::AppendPath(CPDF_Path path, int type, FX_BOOL bAutoMerge) } delete[] pData->m_pPathList; uint8_t* pNewType = FX_Alloc(uint8_t, pData->m_PathCount + 8); - FXSYS_memcpy32(pNewType, pData->m_pTypeList, pData->m_PathCount); + FXSYS_memcpy(pNewType, pData->m_pTypeList, pData->m_PathCount); if (pData->m_pTypeList) { FX_Free(pData->m_pTypeList); } @@ -178,7 +178,7 @@ void CPDF_ClipPath::DeletePath(int index) pData->m_pPathList[i] = pData->m_pPathList[i + 1]; } pData->m_pPathList[pData->m_PathCount - 1].SetNull(); - FXSYS_memmove32(pData->m_pTypeList + index, pData->m_pTypeList + index + 1, pData->m_PathCount - index - 1); + FXSYS_memmove(pData->m_pTypeList + index, pData->m_pTypeList + index + 1, pData->m_PathCount - index - 1); pData->m_PathCount --; } #define FPDF_CLIPPATH_MAX_TEXTS 1024 @@ -193,7 +193,7 @@ void CPDF_ClipPath::AppendTexts(CPDF_TextObject** pTexts, int count) } CPDF_TextObject** pNewList = FX_Alloc(CPDF_TextObject*, pData->m_TextCount + count + 1); if (pData->m_pTextList) { - FXSYS_memcpy32(pNewList, pData->m_pTextList, pData->m_TextCount * sizeof(CPDF_TextObject*)); + FXSYS_memcpy(pNewList, pData->m_pTextList, pData->m_TextCount * sizeof(CPDF_TextObject*)); FX_Free(pData->m_pTextList); } pData->m_pTextList = pNewList; @@ -294,7 +294,7 @@ CPDF_TextStateData::CPDF_TextStateData(const CPDF_TextStateData& src) if (this == &src) { return; } - FXSYS_memcpy32(this, &src, sizeof(CPDF_TextStateData)); + FXSYS_memcpy(this, &src, sizeof(CPDF_TextStateData)); if (m_pDocument && m_pFont) { m_pFont = m_pDocument->GetPageData()->GetFont(m_pFont->GetFontDict(), FALSE); } @@ -348,7 +348,7 @@ FX_FLOAT CPDF_TextState::GetShearAngle() const } CPDF_GeneralStateData::CPDF_GeneralStateData() { - FXSYS_memset32(this, 0, sizeof(CPDF_GeneralStateData)); + FXSYS_memset(this, 0, sizeof(CPDF_GeneralStateData)); FXSYS_strcpy((FX_CHAR*)m_BlendMode, "Normal"); m_StrokeAlpha = 1.0f; m_FillAlpha = 1.0f; @@ -357,7 +357,7 @@ CPDF_GeneralStateData::CPDF_GeneralStateData() } CPDF_GeneralStateData::CPDF_GeneralStateData(const CPDF_GeneralStateData& src) { - FXSYS_memcpy32(this, &src, sizeof(CPDF_GeneralStateData)); + FXSYS_memcpy(this, &src, sizeof(CPDF_GeneralStateData)); if (src.m_pTransferFunc && src.m_pTransferFunc->m_pPDFDoc) { CPDF_DocRenderData* pDocCache = src.m_pTransferFunc->m_pPDFDoc->GetRenderData(); if (!pDocCache) { @@ -422,7 +422,7 @@ void CPDF_GeneralStateData::SetBlendMode(const CFX_ByteStringC& blend_mode) if (blend_mode.GetLength() > 15) { return; } - FXSYS_memcpy32(m_BlendMode, blend_mode.GetPtr(), blend_mode.GetLength()); + FXSYS_memcpy(m_BlendMode, blend_mode.GetPtr(), blend_mode.GetLength()); m_BlendMode[blend_mode.GetLength()] = 0; m_BlendType = ::GetBlendType(blend_mode); } @@ -553,7 +553,7 @@ void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS, CPDF_StreamContentParser case FXBSTR_ID('S', 'M', 'a', 's'): if (pObject && pObject->GetType() == PDFOBJ_DICTIONARY) { pGeneralState->m_pSoftMask = pObject; - FXSYS_memcpy32(pGeneralState->m_SMaskMatrix, &pParser->m_pCurStates->m_CTM, sizeof(CPDF_Matrix)); + FXSYS_memcpy(pGeneralState->m_SMaskMatrix, &pParser->m_pCurStates->m_CTM, sizeof(CPDF_Matrix)); } else { pGeneralState->m_pSoftMask = NULL; } |