Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4
pdf2djvu
0001-pdf-backend-fix-compat-with-Poppler-22.02....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-pdf-backend-fix-compat-with-Poppler-22.02.patch of Package pdf2djvu
From 628b168f0b99d39cb20b71eb29683bcb26f85e0a Mon Sep 17 00:00:00 2001 From: Jakub Wilk <jwilk@jwilk.net> Date: Wed, 16 Feb 2022 09:08:11 +0000 Subject: [PATCH 1/3] pdf-backend: fix compat with Poppler > 22.02. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: pdf-backend.cc: In constructor ‘pdf::Document::Document(const string&)’: pdf-backend.cc:133:64: error: no matching function for call to ‘PDFDoc::PDFDoc(pdf::String*, std::nullptr_t, std::nullptr_t)’ https://cgit.freedesktop.org/poppler/poppler/commit/?id=07889cdfd8a261dc --- pdf-backend.cc | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pdf-backend.cc b/pdf-backend.cc index 3c871b1..c74053d 100644 --- a/pdf-backend.cc +++ b/pdf-backend.cc @@ -129,8 +129,27 @@ void pdf::Environment::set_antialias(bool value) * =================== */ +template <typename T> +class unique_ptr_adapter +{ +protected: + std::unique_ptr<T> uptr; +public: + unique_ptr_adapter(T *ptr) + : uptr(ptr) + { } + operator std::unique_ptr<T> () + { + return std::move(this->uptr); + } + operator T* () + { + return this->uptr.release(); + } +}; + pdf::Document::Document(const std::string &file_name) -: ::PDFDoc(new pdf::String(file_name.c_str()), nullptr, nullptr) +: ::PDFDoc(unique_ptr_adapter<pdf::String>(new pdf::String(file_name.c_str())), nullptr, nullptr) { if (!this->isOk()) throw LoadError(); -- 2.35.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor