Remove some other virtual dtors.
Mark corresponding classes final just to be sure this is safe.
Change-Id: I7f32ed6b2aad44a25aae4918fc24435337d5a793
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/58234
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxcrt/xml/cfx_xmlparser.h b/core/fxcrt/xml/cfx_xmlparser.h
index 38866c8..87ad9d6 100644
--- a/core/fxcrt/xml/cfx_xmlparser.h
+++ b/core/fxcrt/xml/cfx_xmlparser.h
@@ -19,12 +19,12 @@
class CFX_XMLNode;
class IFX_SeekableReadStream;
-class CFX_XMLParser {
+class CFX_XMLParser final {
public:
static bool IsXMLNameChar(wchar_t ch, bool bFirstChar);
explicit CFX_XMLParser(const RetainPtr<IFX_SeekableReadStream>& pStream);
- virtual ~CFX_XMLParser();
+ ~CFX_XMLParser();
std::unique_ptr<CFX_XMLDocument> Parse();
diff --git a/fpdfsdk/pwl/cpwl_list_impl.h b/fpdfsdk/pwl/cpwl_list_impl.h
index baf5c6f..dee6b61 100644
--- a/fpdfsdk/pwl/cpwl_list_impl.h
+++ b/fpdfsdk/pwl/cpwl_list_impl.h
@@ -20,13 +20,13 @@
class CPWL_List_Notify;
class IPVT_FontMap;
-class CPLST_Select {
+class CPLST_Select final {
public:
enum State { DESELECTING = -1, NORMAL = 0, SELECTING = 1 };
using const_iterator = std::map<int32_t, State>::const_iterator;
CPLST_Select();
- virtual ~CPLST_Select();
+ ~CPLST_Select();
void Add(int32_t nItemIndex);
void Add(int32_t nBeginIndex, int32_t nEndIndex);
diff --git a/fxbarcode/datamatrix/BC_DefaultPlacement.h b/fxbarcode/datamatrix/BC_DefaultPlacement.h
index 12ea852..823d587 100644
--- a/fxbarcode/datamatrix/BC_DefaultPlacement.h
+++ b/fxbarcode/datamatrix/BC_DefaultPlacement.h
@@ -11,10 +11,10 @@
#include "core/fxcrt/fx_string.h"
-class CBC_DefaultPlacement {
+class CBC_DefaultPlacement final {
public:
CBC_DefaultPlacement(WideString codewords, int32_t numcols, int32_t numrows);
- virtual ~CBC_DefaultPlacement();
+ ~CBC_DefaultPlacement();
int32_t getNumrows();
int32_t getNumcols();
diff --git a/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h b/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h
index 6097839..d059cee 100644
--- a/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h
+++ b/fxbarcode/pdf417/BC_PDF417BarcodeMatrix.h
@@ -12,10 +12,10 @@
class CBC_BarcodeRow;
-class CBC_BarcodeMatrix {
+class CBC_BarcodeMatrix final {
public:
CBC_BarcodeMatrix(size_t width, size_t height);
- virtual ~CBC_BarcodeMatrix();
+ ~CBC_BarcodeMatrix();
CBC_BarcodeRow* getRow(size_t row) const { return m_matrix[row].get(); }
size_t getWidth() const { return m_width; }
diff --git a/fxbarcode/pdf417/BC_PDF417BarcodeRow.h b/fxbarcode/pdf417/BC_PDF417BarcodeRow.h
index 4709420..07ebbd7 100644
--- a/fxbarcode/pdf417/BC_PDF417BarcodeRow.h
+++ b/fxbarcode/pdf417/BC_PDF417BarcodeRow.h
@@ -11,10 +11,10 @@
#include <vector>
-class CBC_BarcodeRow {
+class CBC_BarcodeRow final {
public:
explicit CBC_BarcodeRow(size_t width);
- virtual ~CBC_BarcodeRow();
+ ~CBC_BarcodeRow();
void addBar(bool black, int32_t width);
std::vector<uint8_t>& getRow();
diff --git a/fxbarcode/qrcode/BC_QRCoder.h b/fxbarcode/qrcode/BC_QRCoder.h
index 882822f..5793858 100644
--- a/fxbarcode/qrcode/BC_QRCoder.h
+++ b/fxbarcode/qrcode/BC_QRCoder.h
@@ -15,12 +15,12 @@
class CBC_QRCoderMode;
class CBC_CommonByteMatrix;
-class CBC_QRCoder {
+class CBC_QRCoder final {
public:
static constexpr int32_t kNumMaskPatterns = 8;
CBC_QRCoder();
- virtual ~CBC_QRCoder();
+ ~CBC_QRCoder();
static bool IsValidMaskPattern(int32_t maskPattern);
diff --git a/fxbarcode/qrcode/BC_QRCoderMode.h b/fxbarcode/qrcode/BC_QRCoderMode.h
index ba762f0..b61d751 100644
--- a/fxbarcode/qrcode/BC_QRCoderMode.h
+++ b/fxbarcode/qrcode/BC_QRCoderMode.h
@@ -11,9 +11,9 @@
#include <vector>
-class CBC_QRCoderMode {
+class CBC_QRCoderMode final {
public:
- virtual ~CBC_QRCoderMode();
+ ~CBC_QRCoderMode();
static void Initialize();
static void Finalize();
diff --git a/xfa/fxgraphics/cxfa_gepattern.h b/xfa/fxgraphics/cxfa_gepattern.h
index d811ec9..f5a3413 100644
--- a/xfa/fxgraphics/cxfa_gepattern.h
+++ b/xfa/fxgraphics/cxfa_gepattern.h
@@ -14,13 +14,13 @@
class CFX_DIBitmap;
class CFX_Matrix;
-class CXFA_GEPattern {
+class CXFA_GEPattern final {
public:
CXFA_GEPattern(FX_HatchStyle hatchStyle,
const FX_ARGB foreArgb,
const FX_ARGB backArgb);
- virtual ~CXFA_GEPattern();
+ ~CXFA_GEPattern();
private:
friend class CXFA_Graphics;
diff --git a/xfa/fxgraphics/cxfa_geshading.h b/xfa/fxgraphics/cxfa_geshading.h
index fc7a13e..8905a12 100644
--- a/xfa/fxgraphics/cxfa_geshading.h
+++ b/xfa/fxgraphics/cxfa_geshading.h
@@ -15,7 +15,7 @@
enum CXFA_GEShading_Type { FX_SHADING_Axial = 1, FX_SHADING_Radial };
-class CXFA_GEShading {
+class CXFA_GEShading final {
public:
// Axial shading.
CXFA_GEShading(const CFX_PointF& beginPoint,
@@ -34,7 +34,8 @@
bool isExtendedEnd,
const FX_ARGB beginArgb,
const FX_ARGB endArgb);
- virtual ~CXFA_GEShading();
+
+ ~CXFA_GEShading();
private:
friend class CXFA_Graphics;