Cleanup: use std::make_shared.
authorCarl Hetherington <cth@carlh.net>
Sat, 29 Oct 2022 10:11:00 +0000 (12:11 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 29 Oct 2022 10:11:11 +0000 (12:11 +0200)
src/j2k_transcode.cc

index 9b7210aafd7ff229d434f09487805c6b36a11e2e..0374d81b218e26b949c1ad8465fe78e5dd237bd8 100644 (file)
@@ -183,7 +183,7 @@ dcp::decompress_j2k (uint8_t const * data, int64_t size, int reduce)
 
        image->x1 = rint (float(image->x1) / pow (2.0f, reduce));
        image->y1 = rint (float(image->y1) / pow (2.0f, reduce));
-       return shared_ptr<OpenJPEGImage> (new OpenJPEGImage (image));
+       return std::make_shared<OpenJPEGImage>(image);
 }
 
 #endif
@@ -212,7 +212,7 @@ dcp::decompress_j2k (uint8_t* data, int64_t size, int reduce)
 
        image->x1 = rint (float(image->x1) / pow (2, reduce));
        image->y1 = rint (float(image->y1) / pow (2, reduce));
-       return shared_ptr<OpenJPEGImage> (new OpenJPEGImage (image));
+       return std::make_shared<OpenJPEGImage>(image);
 }
 #endif