summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/extension.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 11:30:25 -0700
commitbb17868d736f698d5217c30d52c5bbfed62c5936 (patch)
tree9d4d3e2538a81e6241d4992570bc3f3c1af71d28 /core/src/fxcrt/extension.h
parentbf6c2a4873f8cc12ad910fb904218a78087a3735 (diff)
downloadpdfium-bb17868d736f698d5217c30d52c5bbfed62c5936.tar.xz
Use stdint.h types throughout PDFium.
It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002
Diffstat (limited to 'core/src/fxcrt/extension.h')
-rw-r--r--core/src/fxcrt/extension.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index ce66e26402..c2d72f4bf1 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -160,7 +160,7 @@ public:
~CFX_MemoryStream()
{
if (m_dwFlags & FX_MEMSTREAM_TakeOver) {
- for (FX_INT32 i = 0; i < m_Blocks.GetSize(); i++) {
+ for (int32_t i = 0; i < m_Blocks.GetSize(); i++) {
FX_Free((FX_LPBYTE)m_Blocks[i]);
}
}
@@ -270,7 +270,7 @@ public:
}
}
size_t nRead = FX_MIN(size, m_nCurSize - m_nCurPos);
- if (!ReadBlock(buffer, (FX_INT32)m_nCurPos, nRead)) {
+ if (!ReadBlock(buffer, (int32_t)m_nCurPos, nRead)) {
return 0;
}
return nRead;
@@ -293,10 +293,10 @@ public:
if (m_nCurPos > m_nTotalSize) {
m_nTotalSize = (m_nCurPos + m_nGrowSize - 1) / m_nGrowSize * m_nGrowSize;
if (m_Blocks.GetSize() < 1) {
- void* block = FX_Alloc(FX_BYTE, m_nTotalSize);
+ void* block = FX_Alloc(uint8_t, m_nTotalSize);
m_Blocks.Add(block);
} else {
- m_Blocks[0] = FX_Realloc(FX_BYTE, m_Blocks[0], m_nTotalSize);
+ m_Blocks[0] = FX_Realloc(uint8_t, m_Blocks[0], m_nTotalSize);
}
if (!m_Blocks[0]) {
m_Blocks.RemoveAll();
@@ -347,7 +347,7 @@ public:
{
if (m_dwFlags & FX_MEMSTREAM_Consecutive) {
if (m_Blocks.GetSize() < 1) {
- FX_LPBYTE pBlock = FX_Alloc(FX_BYTE, FX_MAX(nInitSize, 4096));
+ FX_LPBYTE pBlock = FX_Alloc(uint8_t, FX_MAX(nInitSize, 4096));
m_Blocks.Add(pBlock);
}
m_nGrowSize = FX_MAX(nGrowSize, 4096);
@@ -400,11 +400,11 @@ protected:
if (size <= m_nTotalSize) {
return TRUE;
}
- FX_INT32 iCount = m_Blocks.GetSize();
+ int32_t iCount = m_Blocks.GetSize();
size = (size - m_nTotalSize + m_nGrowSize - 1) / m_nGrowSize;
- m_Blocks.SetSize(m_Blocks.GetSize() + (FX_INT32)size);
+ m_Blocks.SetSize(m_Blocks.GetSize() + (int32_t)size);
while (size --) {
- FX_LPBYTE pBlock = FX_Alloc(FX_BYTE, m_nGrowSize);
+ FX_LPBYTE pBlock = FX_Alloc(uint8_t, m_nGrowSize);
m_Blocks.SetAt(iCount ++, pBlock);
m_nTotalSize += m_nGrowSize;
}
@@ -431,7 +431,7 @@ typedef struct _FX_MTRANDOMCONTEXT {
} FX_MTRANDOMCONTEXT, * FX_LPMTRANDOMCONTEXT;
typedef FX_MTRANDOMCONTEXT const * FX_LPCMTRANDOMCONTEXT;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-FX_BOOL FX_GenerateCryptoRandom(FX_LPDWORD pBuffer, FX_INT32 iCount);
+FX_BOOL FX_GenerateCryptoRandom(FX_LPDWORD pBuffer, int32_t iCount);
#endif
#ifdef __cplusplus
}