summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/poppler-image.cpp2
-rw-r--r--cpp/poppler-page.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/cpp/poppler-image.cpp b/cpp/poppler-image.cpp
index 6bd43f7d..7c9bdad7 100644
--- a/cpp/poppler-image.cpp
+++ b/cpp/poppler-image.cpp
@@ -125,7 +125,7 @@ image_private *image_private::create_data(int width, int height, image::format_e
return nullptr;
}
- std::unique_ptr<image_private> d(new image_private(width, height, format));
+ auto d = std::make_unique<image_private>(width, height, format);
d->bytes_num = bpr * height;
d->data = reinterpret_cast<char *>(std::malloc(d->bytes_num));
if (!d->data) {
diff --git a/cpp/poppler-page.cpp b/cpp/poppler-page.cpp
index c3862cef..8280c14f 100644
--- a/cpp/poppler-page.cpp
+++ b/cpp/poppler-page.cpp
@@ -336,13 +336,13 @@ std::vector<text_box> page::text_list() const
std::vector<text_box> output_list;
/* config values are same with Qt5 Page::TextList() */
- std::unique_ptr<TextOutputDev> output_dev{
- new TextOutputDev(nullptr, /* char* fileName */
- gFalse, /* GBool physLayoutA */
- 0, /* double fixedPitchA */
- gFalse, /* GBool rawOrderA */
- gFalse) /* GBool append */
- };
+ auto output_dev = std::make_unique<TextOutputDev>(
+ nullptr, /* char* fileName */
+ gFalse, /* GBool physLayoutA */
+ 0, /* double fixedPitchA */
+ gFalse, /* GBool rawOrderA */
+ gFalse /* GBool append */
+ );
/*
* config values are same with Qt5 Page::TextList(),