|
| 1 | +From 20deec0782b78d1c8302764e852ff174f7a4f564 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Ariel D'Alessandro < [email protected]> |
| 3 | +Date: Fri, 15 Nov 2024 00:49:27 -0300 |
| 4 | +Subject: [PATCH] pdfium: Fix missing PDFiumAPIStringBufferAdapter template |
| 5 | + argument |
| 6 | + |
| 7 | +Fix the following compilation error: |
| 8 | + |
| 9 | +``` |
| 10 | +| ../../pdf/pdfium/pdfium_api_wrappers.cc:150:32: error: alias template |
| 11 | + 'PDFiumAPIStringBufferAdapter' requires template arguments; argument |
| 12 | + deduction only allowed for class templates |
| 13 | +| 150 | PDFiumAPIStringBufferAdapter adapter(&name, expected_size, |
| 14 | +| | ^ |
| 15 | +| ../../pdf/pdfium/pdfium_api_string_buffer_adapter.h:173:1: note: template |
| 16 | + is declared here |
| 17 | +| 173 | using PDFiumAPIStringBufferAdapter = |
| 18 | +| | ^ |
| 19 | +| 1 error generated. |
| 20 | +``` |
| 21 | + |
| 22 | +Signed-off-by: Ariel D'Alessandro < [email protected]> |
| 23 | +--- |
| 24 | + pdf/pdfium/pdfium_api_wrappers.cc | 2 +- |
| 25 | + 1 file changed, 1 insertion(+), 1 deletion(-) |
| 26 | + |
| 27 | +diff --git a/pdf/pdfium/pdfium_api_wrappers.cc b/pdf/pdfium/pdfium_api_wrappers.cc |
| 28 | +index b13fe20875e61..60c973b7152ab 100644 |
| 29 | +--- a/pdf/pdfium/pdfium_api_wrappers.cc |
| 30 | ++++ b/pdf/pdfium/pdfium_api_wrappers.cc |
| 31 | +@@ -147,7 +147,7 @@ std::u16string GetPageObjectMarkName(FPDF_PAGEOBJECTMARK mark) { |
| 32 | + |
| 33 | + // Number of characters, including the NUL. |
| 34 | + const size_t expected_size = base::checked_cast<size_t>(buflen_bytes / 2); |
| 35 | +- PDFiumAPIStringBufferAdapter adapter(&name, expected_size, |
| 36 | ++ PDFiumAPIStringBufferAdapter<std::u16string> adapter(&name, expected_size, |
| 37 | + /*check_expected_size=*/true); |
| 38 | + unsigned long actual_buflen_bytes = 0; // NOLINT(runtime/int) |
| 39 | + bool result = |
| 40 | +-- |
| 41 | +2.45.2 |
| 42 | + |
0 commit comments