Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6dbd3d7a authored by Yi Kong's avatar Yi Kong
Browse files

Add virtual dtor for virtual classes

delete called on non-final virtual classes but non-virtual destructor.

Fixes -Wdelete-non-virtual-dtor warning.

Test: m checkbuild
Change-Id: I142a2f70286a28722e462df4c160cb7aa3753c2a
parent 1c876b73
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ namespace aapt {
 */
class AbiFilter : public IPathFilter {
 public:
  virtual ~AbiFilter() = default;

  /** Factory method to create a filter from a list of configuration::Abi. */
  static std::unique_ptr<AbiFilter> FromAbiList(const std::vector<configuration::Abi>& abi_list);

+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ namespace aapt {
/** A filter to be applied to a path segment. */
class IPathFilter {
 public:
  ~IPathFilter() = default;
  virtual ~IPathFilter() = default;

  /** Returns true if the path should be kept. */
  virtual bool Keep(const std::string& path) = 0;