summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-22 14:57:45 -0800
committerLei Zhang <thestig@chromium.org>2015-12-22 14:57:45 -0800
commit9ba6a147311eacb933c175168de6d11c439985d3 (patch)
treea1a75ac52168294f73b6eda5c65c26e4444b4c47 /core/src/fxcodec/jbig2
parentcd2bb30aba89a05c0bbd4d6973fa070205e3a1e8 (diff)
downloadpdfium-9ba6a147311eacb933c175168de6d11c439985d3.tar.xz
Merge to XFA: Start using allowed C++11 features.
TBR=dml@google.com, thakis@chromium.org Review URL: https://codereview.chromium.org/1544923002 . Review URL: https://codereview.chromium.org/1545823002 . (cherry picked from commit ba2586d2c0a50df14aa2549a0a841e1d4b9af4b6) (cherry picked from commit 87f7d29531dabfd66e547a6be31a08272ff631d5) Review URL: https://codereview.chromium.org/1542213002 .
Diffstat (limited to 'core/src/fxcodec/jbig2')
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Context.cpp3
-rw-r--r--core/src/fxcodec/jbig2/JBig2_SddProc.cpp14
2 files changed, 7 insertions, 10 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.cpp b/core/src/fxcodec/jbig2/JBig2_Context.cpp
index 2a28185d88..9503fed95e 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Context.cpp
@@ -8,6 +8,7 @@
#include <algorithm>
#include <list>
+#include <utility>
#include <vector>
#include "core/src/fxcodec/jbig2/JBig2_ArithDecoder.h"
@@ -1119,7 +1120,7 @@ int32_t CJBig2_Context::parseGenericRegion(CJBig2_Segment* pSegment,
}
}
pGRD->USESKIP = 0;
- m_pGRD = nonstd::move(pGRD);
+ m_pGRD = std::move(pGRD);
}
pSegment->m_nResultType = JBIG2_IMAGE_POINTER;
if (m_pGRD->MMR == 0) {
diff --git a/core/src/fxcodec/jbig2/JBig2_SddProc.cpp b/core/src/fxcodec/jbig2/JBig2_SddProc.cpp
index 06d6520f3f..e9ce932d91 100644
--- a/core/src/fxcodec/jbig2/JBig2_SddProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_SddProc.cpp
@@ -18,9 +18,6 @@
#include "core/src/fxcodec/jbig2/JBig2_SymbolDict.h"
#include "core/src/fxcodec/jbig2/JBig2_TrdProc.h"
#include "third_party/base/nonstd_unique_ptr.h"
-#include "third_party/base/stl_util.h"
-
-using pdfium::vector_as_array;
CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith(
CJBig2_ArithDecoder* pArithDecoder,
@@ -110,7 +107,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith(
pGRD->GBAT[5] = SDAT[5];
pGRD->GBAT[6] = SDAT[6];
pGRD->GBAT[7] = SDAT[7];
- BS = pGRD->decode_Arith(pArithDecoder, vector_as_array(gbContext));
+ BS = pGRD->decode_Arith(pArithDecoder, gbContext->data());
if (!BS) {
goto failed;
}
@@ -198,8 +195,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith(
ids.IARDX = IARDX.get();
ids.IARDY = IARDY.get();
ids.IAID = IAID.get();
- BS = pDecoder->decode_Arith(pArithDecoder, vector_as_array(grContext),
- &ids);
+ BS = pDecoder->decode_Arith(pArithDecoder, grContext->data(), &ids);
if (!BS) {
FX_Free(SBSYMS);
goto failed;
@@ -234,7 +230,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith(
pGRRD->GRAT[1] = SDRAT[1];
pGRRD->GRAT[2] = SDRAT[2];
pGRRD->GRAT[3] = SDRAT[3];
- BS = pGRRD->decode(pArithDecoder, vector_as_array(grContext));
+ BS = pGRRD->decode(pArithDecoder, grContext->data());
if (!BS) {
FX_Free(SBSYMS);
goto failed;
@@ -448,7 +444,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Huffman(
pDecoder->SBRAT[1] = SDRAT[1];
pDecoder->SBRAT[2] = SDRAT[2];
pDecoder->SBRAT[3] = SDRAT[3];
- BS = pDecoder->decode_Huffman(pStream, vector_as_array(grContext));
+ BS = pDecoder->decode_Huffman(pStream, grContext->data());
if (!BS) {
FX_Free(SBSYMCODES);
FX_Free(SBSYMS);
@@ -520,7 +516,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Huffman(
pGRRD->GRAT[3] = SDRAT[3];
nonstd::unique_ptr<CJBig2_ArithDecoder> pArithDecoder(
new CJBig2_ArithDecoder(pStream));
- BS = pGRRD->decode(pArithDecoder.get(), vector_as_array(grContext));
+ BS = pGRRD->decode(pArithDecoder.get(), grContext->data());
if (!BS) {
FX_Free(SBSYMS);
goto failed;