diff options
author | tsepez <tsepez@chromium.org> | 2016-04-04 16:41:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-04 16:41:35 -0700 |
commit | 28f97ff783c16f3391384ce97b765ce4eb310ac7 (patch) | |
tree | 69c4c8bc9dd39d5336c96f28b633d197dd207c81 /xfa/fee/fde_txtedtengine.cpp | |
parent | ed9c4386713084f37548b46ab36f618021f716f5 (diff) | |
download | pdfium-28f97ff783c16f3391384ce97b765ce4eb310ac7.tar.xz |
Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC.
Having this happen implicitly can be dangerous because the lifetime
has to be considered; we should have caught the "red bots" in
https://codereview.chromium.org/1847333004/#ps60001 at compile time.
Review URL: https://codereview.chromium.org/1853233002
Diffstat (limited to 'xfa/fee/fde_txtedtengine.cpp')
-rw-r--r-- | xfa/fee/fde_txtedtengine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fee/fde_txtedtengine.cpp b/xfa/fee/fde_txtedtengine.cpp index d397afd7e3..19b5b24311 100644 --- a/xfa/fee/fde_txtedtengine.cpp +++ b/xfa/fee/fde_txtedtengine.cpp @@ -391,7 +391,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart, new CFDE_TxtEdtDoRecord_Insert(this, m_nCaret, lpBuffer, nLength); CFX_ByteString bsDoRecord; pRecord->Serialize(bsDoRecord); - m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord); + m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord.AsByteStringC()); pRecord->Release(); } GetText(m_ChangeInfo.wsPrevText, 0); @@ -454,7 +454,7 @@ int32_t CFDE_TxtEdtEngine::Delete(int32_t nStart, FX_BOOL bBackspace) { new CFDE_TxtEdtDoRecord_DeleteRange(this, nStart, m_nCaret, wsRange); CFX_ByteString bsDoRecord; pRecord->Serialize(bsDoRecord); - m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord); + m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord.AsByteStringC()); pRecord->Release(); } m_ChangeInfo.nChangeType = FDE_TXTEDT_TEXTCHANGE_TYPE_Delete; @@ -944,7 +944,7 @@ void CFDE_TxtEdtEngine::DeleteRange_DoRecord(int32_t nStart, this, nStart, m_nCaret, wsRange, bSel); CFX_ByteString bsDoRecord; pRecord->Serialize(bsDoRecord); - m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord); + m_Param.pEventSink->On_AddDoRecord(this, bsDoRecord.AsByteStringC()); pRecord->Release(); } m_ChangeInfo.nChangeType = FDE_TXTEDT_TEXTCHANGE_TYPE_Delete; |