Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Unified Diff: core/fxge/dib/fx_dib_convert.cpp

Issue 2534953004: Return unique_ptrs from CFX_DIBitmap::Clone(). (Closed)
Patch Set: win again Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fxge/dib/fx_dib_convert.cpp
diff --git a/core/fxge/dib/fx_dib_convert.cpp b/core/fxge/dib/fx_dib_convert.cpp
index f5ae563d57e6444fcfc61051936f9a87c92c5b12..e4c65f35d66a7d4c02a3f6c745925bf74d09bc25 100644
--- a/core/fxge/dib/fx_dib_convert.cpp
+++ b/core/fxge/dib/fx_dib_convert.cpp
@@ -781,7 +781,8 @@ bool ConvertBuffer(FXDIB_Format dest_format,
}
}
-CFX_DIBitmap* CFX_DIBSource::CloneConvert(FXDIB_Format dest_format) const {
+std::unique_ptr<CFX_DIBitmap> CFX_DIBSource::CloneConvert(
+ FXDIB_Format dest_format) const {
if (dest_format == GetFormat())
return Clone(nullptr);
@@ -819,7 +820,8 @@ CFX_DIBitmap* CFX_DIBSource::CloneConvert(FXDIB_Format dest_format) const {
}
if (pal_8bpp)
pClone->CopyPalette(pal_8bpp.get());
- return pClone.release();
+
+ return pClone;
}
bool CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format) {

Powered by Google App Engine
This is Rietveld 408576698