summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/cfx_seekablemultistream.cpp4
-rw-r--r--core/fxcrt/cfx_seekablemultistream.h3
-rw-r--r--core/fxcrt/cfx_seekablemultistream_unittest.cpp6
3 files changed, 7 insertions, 6 deletions
diff --git a/core/fxcrt/cfx_seekablemultistream.cpp b/core/fxcrt/cfx_seekablemultistream.cpp
index 92286b1939..24a29ee425 100644
--- a/core/fxcrt/cfx_seekablemultistream.cpp
+++ b/core/fxcrt/cfx_seekablemultistream.cpp
@@ -13,8 +13,8 @@
#include "third_party/base/stl_util.h"
CFX_SeekableMultiStream::CFX_SeekableMultiStream(
- const std::vector<CPDF_Stream*>& streams) {
- for (CPDF_Stream* pStream : streams) {
+ const std::vector<const CPDF_Stream*>& streams) {
+ for (const CPDF_Stream* pStream : streams) {
m_Data.push_back(pdfium::MakeRetain<CPDF_StreamAcc>(pStream));
m_Data.back()->LoadAllDataFiltered();
}
diff --git a/core/fxcrt/cfx_seekablemultistream.h b/core/fxcrt/cfx_seekablemultistream.h
index 9138d7c321..4bd26b9863 100644
--- a/core/fxcrt/cfx_seekablemultistream.h
+++ b/core/fxcrt/cfx_seekablemultistream.h
@@ -17,7 +17,8 @@ class CPDF_StreamAcc;
class CFX_SeekableMultiStream : public IFX_SeekableStream {
public:
- explicit CFX_SeekableMultiStream(const std::vector<CPDF_Stream*>& streams);
+ explicit CFX_SeekableMultiStream(
+ const std::vector<const CPDF_Stream*>& streams);
~CFX_SeekableMultiStream() override;
// IFX_SeekableReadStream
diff --git a/core/fxcrt/cfx_seekablemultistream_unittest.cpp b/core/fxcrt/cfx_seekablemultistream_unittest.cpp
index 89213b13af..89be1bd180 100644
--- a/core/fxcrt/cfx_seekablemultistream_unittest.cpp
+++ b/core/fxcrt/cfx_seekablemultistream_unittest.cpp
@@ -15,7 +15,7 @@
#include "third_party/base/ptr_util.h"
TEST(CFX_SeekableMultiStreamTest, NoStreams) {
- std::vector<CPDF_Stream*> streams;
+ std::vector<const CPDF_Stream*> streams;
auto fileread = pdfium::MakeRetain<CFX_SeekableMultiStream>(streams);
uint8_t output_buffer[16];
@@ -25,7 +25,7 @@ TEST(CFX_SeekableMultiStreamTest, NoStreams) {
}
TEST(CXFAFileReadTest, EmptyStreams) {
- std::vector<CPDF_Stream*> streams;
+ std::vector<const CPDF_Stream*> streams;
auto stream1 = pdfium::MakeUnique<CPDF_Stream>();
streams.push_back(stream1.get());
auto fileread = pdfium::MakeRetain<CFX_SeekableMultiStream>(streams);
@@ -37,7 +37,7 @@ TEST(CXFAFileReadTest, EmptyStreams) {
}
TEST(CXFAFileReadTest, NormalStreams) {
- std::vector<CPDF_Stream*> streams;
+ std::vector<const CPDF_Stream*> streams;
auto stream1 = pdfium::MakeUnique<CPDF_Stream>();
auto stream2 = pdfium::MakeUnique<CPDF_Stream>();
auto stream3 = pdfium::MakeUnique<CPDF_Stream>();