[poppler] cpp/poppler-document.cpp

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Mar 15 14:06:13 UTC 2022


 cpp/poppler-document.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5e2271f8ca858b5aa80a7988b9f404a74a5abaa4
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue Mar 15 15:00:25 2022 +0100

    cpp: Remove no longer needed const_cast

diff --git a/cpp/poppler-document.cpp b/cpp/poppler-document.cpp
index 6a8aa9c4..9c4f4c1d 100644
--- a/cpp/poppler-document.cpp
+++ b/cpp/poppler-document.cpp
@@ -66,7 +66,7 @@ document_private::document_private(const char *file_data, int file_data_length,
 {
     raw_doc_data = file_data;
     raw_doc_data_length = file_data_length;
-    MemStream *memstr = new MemStream(const_cast<char *>(raw_doc_data), 0, raw_doc_data_length, Object(objNull));
+    MemStream *memstr = new MemStream(raw_doc_data, 0, raw_doc_data_length, Object(objNull));
     doc = new PDFDoc(memstr, GooString(owner_password.c_str()), GooString(user_password.c_str()));
 }
 


More information about the poppler mailing list