-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chromium: [PATCH] pdfium: Fix missing function argument
Fix the following compilation error: ``` | ../../pdf/pdfium/pdfium_api_wrappers.cc:150:32: error: alias template 'PDFiumAPIStringBufferAdapter' requires template arguments; argument deduction only allowed for class templates | 150 | PDFiumAPIStringBufferAdapter adapter(&name, expected_size, | | ^ | ../../pdf/pdfium/pdfium_api_string_buffer_adapter.h:173:1: note: template is declared here | 173 | using PDFiumAPIStringBufferAdapter = | | ^ | 1 error generated. ``` Signed-off-by: Ariel D'Alessandro <[email protected]>
- Loading branch information
1 parent
c0e2645
commit 9e5ee27
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...es-browser/chromium/files/0015-pdfium-Fix-missing-PDFiumAPIStringBufferAdapter-temp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From 20deec0782b78d1c8302764e852ff174f7a4f564 Mon Sep 17 00:00:00 2001 | ||
From: Ariel D'Alessandro <[email protected]> | ||
Date: Fri, 15 Nov 2024 00:49:27 -0300 | ||
Subject: [PATCH] pdfium: Fix missing PDFiumAPIStringBufferAdapter template | ||
argument | ||
|
||
Fix the following compilation error: | ||
|
||
``` | ||
| ../../pdf/pdfium/pdfium_api_wrappers.cc:150:32: error: alias template | ||
'PDFiumAPIStringBufferAdapter' requires template arguments; argument | ||
deduction only allowed for class templates | ||
| 150 | PDFiumAPIStringBufferAdapter adapter(&name, expected_size, | ||
| | ^ | ||
| ../../pdf/pdfium/pdfium_api_string_buffer_adapter.h:173:1: note: template | ||
is declared here | ||
| 173 | using PDFiumAPIStringBufferAdapter = | ||
| | ^ | ||
| 1 error generated. | ||
``` | ||
|
||
Signed-off-by: Ariel D'Alessandro <[email protected]> | ||
--- | ||
pdf/pdfium/pdfium_api_wrappers.cc | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/pdf/pdfium/pdfium_api_wrappers.cc b/pdf/pdfium/pdfium_api_wrappers.cc | ||
index b13fe20875e61..60c973b7152ab 100644 | ||
--- a/pdf/pdfium/pdfium_api_wrappers.cc | ||
+++ b/pdf/pdfium/pdfium_api_wrappers.cc | ||
@@ -147,7 +147,7 @@ std::u16string GetPageObjectMarkName(FPDF_PAGEOBJECTMARK mark) { | ||
|
||
// Number of characters, including the NUL. | ||
const size_t expected_size = base::checked_cast<size_t>(buflen_bytes / 2); | ||
- PDFiumAPIStringBufferAdapter adapter(&name, expected_size, | ||
+ PDFiumAPIStringBufferAdapter<std::u16string> adapter(&name, expected_size, | ||
/*check_expected_size=*/true); | ||
unsigned long actual_buflen_bytes = 0; // NOLINT(runtime/int) | ||
bool result = |