summaryrefslogtreecommitdiff
path: root/xfa/src/fgas
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-22 12:19:42 -0800
committerLei Zhang <thestig@chromium.org>2016-02-22 12:19:42 -0800
commitd6b15fc92cb30cfc346fe28379d0aa8a24cbf601 (patch)
treeb37e5c9851595ce5111438498a219d467720dd6e /xfa/src/fgas
parent2373da22a2e754ae9b0e7d913da0ce2e925f76a0 (diff)
downloadpdfium-d6b15fc92cb30cfc346fe28379d0aa8a24cbf601.tar.xz
Define NDEBUG for Release builds.
Also fix -Wunused warnings as a result of this change. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1717063002 .
Diffstat (limited to 'xfa/src/fgas')
-rw-r--r--xfa/src/fgas/src/crt/fx_utils.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/xfa/src/fgas/src/crt/fx_utils.cpp b/xfa/src/fgas/src/crt/fx_utils.cpp
index 31fcb9e9b5..470abf4319 100644
--- a/xfa/src/fgas/src/crt/fx_utils.cpp
+++ b/xfa/src/fgas/src/crt/fx_utils.cpp
@@ -227,15 +227,20 @@ int32_t CFX_BaseMassArrayImp::Copy(const CFX_BaseMassArrayImp& src,
Append(0, src, iStart, iCount);
return m_iBlockCount;
}
+
void CFX_BaseMassArrayImp::Append(int32_t iDstStart,
const CFX_BaseMassArrayImp& src,
int32_t iSrcStart,
int32_t iSrcCount) {
- FXSYS_assert(iDstStart > -1 && m_iBlockSize == src.m_iBlockSize);
- int32_t iSrcTotal = src.m_iBlockCount;
- FXSYS_assert(iSrcTotal > 0 && m_iBlockCount >= iDstStart + iSrcCount);
- FXSYS_assert(iSrcStart > -1 && iSrcStart < iSrcTotal && iSrcCount > 0 &&
- iSrcStart + iSrcCount <= iSrcTotal);
+ FXSYS_assert(iDstStart > -1);
+ FXSYS_assert(m_iBlockSize == src.m_iBlockSize);
+ FXSYS_assert(src.m_iBlockCount > 0);
+ FXSYS_assert(m_iBlockCount >= iDstStart + iSrcCount);
+ FXSYS_assert(iSrcStart > -1);
+ FXSYS_assert(iSrcStart < src.m_iBlockCount);
+ FXSYS_assert(iSrcCount > 0);
+ FXSYS_assert(iSrcStart + iSrcCount <= src.m_iBlockCount);
+
int32_t iDstChunkIndex = iDstStart / m_iChunkSize;
int32_t iSrcChunkIndex = iSrcStart / src.m_iChunkSize;
uint8_t* pDstChunk = (uint8_t*)GetAt(iDstStart);