Initialize CFX_DIBitmap in the header.
So the ctor can become = default.
Change-Id: I7d6769ae37e3cb4e581cd0e2663d0b6495392d5e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/73573
Reviewed-by: Hui Yingst <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxge/dib/cfx_dibitmap.cpp b/core/fxge/dib/cfx_dibitmap.cpp
index 86a1005..6f97805 100644
--- a/core/fxge/dib/cfx_dibitmap.cpp
+++ b/core/fxge/dib/cfx_dibitmap.cpp
@@ -22,12 +22,7 @@
} // namespace
-CFX_DIBitmap::CFX_DIBitmap() {
- m_pPalette = nullptr;
-#if defined(_SKIA_SUPPORT_PATHS_)
- m_nFormat = Format::kCleared;
-#endif
-}
+CFX_DIBitmap::CFX_DIBitmap() = default;
bool CFX_DIBitmap::Create(int width, int height, FXDIB_Format format) {
return Create(width, height, format, nullptr, 0);
diff --git a/core/fxge/dib/cfx_dibitmap.h b/core/fxge/dib/cfx_dibitmap.h
index dfeb3c2..ae9b258 100644
--- a/core/fxge/dib/cfx_dibitmap.h
+++ b/core/fxge/dib/cfx_dibitmap.h
@@ -129,7 +129,7 @@
MaybeOwned<uint8_t, FxFreeDeleter> m_pBuffer;
#if defined(_SKIA_SUPPORT_PATHS_)
- Format m_nFormat;
+ Format m_nFormat = Format::kCleared;
#endif
private: