Pass span<> arguments in GetPostScriptFromEmf().
Preferable to a const-ref vector of a specific allocator type.
Change-Id: I691b3da6716ed99d3b00e5e11d65e7e9e4d0c30a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62633
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index b092bc6..4507bb9 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -420,7 +420,7 @@
// static
std::string EmbedderTest::GetPostScriptFromEmf(
- const std::vector<uint8_t>& emf_data) {
+ pdfium::span<const uint8_t> emf_data) {
// This comes from Emf::InitFromData() in Chromium.
HENHMETAFILE emf = SetEnhMetaFileBits(emf_data.size(), emf_data.data());
if (!emf)
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index a088577..0b9abbe 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -21,6 +21,7 @@
#include "testing/fake_file_access.h"
#include "testing/free_deleter.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/base/span.h"
class TestLoader;
@@ -168,8 +169,8 @@
int flags);
// Get the PostScript data from |emf_data|.
- static std::string GetPostScriptFromEmf(const std::vector<uint8_t>& emf_data);
-#endif
+ static std::string GetPostScriptFromEmf(pdfium::span<const uint8_t> emf_data);
+#endif // defined(OS_WIN)
protected:
using PageNumberToHandleMap = std::map<int, FPDF_PAGE>;