summaryrefslogtreecommitdiff
path: root/cpp/poppler-image.cpp
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2019-12-02 19:16:36 +0100
committerAlbert Astals Cid <aacid@kde.org>2019-12-02 19:18:17 +0100
commit3caf1a7a54372f74090caf284ddd3e8e94286d49 (patch)
tree0da858a16e290d0e98bcc7ef0cae0e3ed6064d27 /cpp/poppler-image.cpp
parent2ad55c01e03a3fdb287dae73dbd37849498fa329 (diff)
Enable modernize-make-shared and modernize-make-unique
Diffstat (limited to 'cpp/poppler-image.cpp')
-rw-r--r--cpp/poppler-image.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/poppler-image.cpp b/cpp/poppler-image.cpp
index 745bf221..48f021bf 100644
--- a/cpp/poppler-image.cpp
+++ b/cpp/poppler-image.cpp
@@ -367,21 +367,21 @@ bool image::save(const std::string &file_name, const std::string &out_format, in
}
#if defined(ENABLE_LIBPNG)
else if (fmt == "png") {
- w.reset(new PNGWriter());
+ w = std::make_unique<PNGWriter>();
}
#endif
#if defined(ENABLE_LIBJPEG)
else if (fmt == "jpeg" || fmt == "jpg") {
- w.reset(new JpegWriter());
+ w = std::make_unique<JpegWriter>();
}
#endif
#if defined(ENABLE_LIBTIFF)
else if (fmt == "tiff") {
- w.reset(new TiffWriter());
+ w = std::make_unique<TiffWriter>();
}
#endif
else if (fmt == "pnm") {
- w.reset(new NetPBMWriter(pnm_format(d->format)));
+ w = std::make_unique<NetPBMWriter>(pnm_format(d->format));
}
if (!w.get()) {
return false;