From 6dbd3d7a59748c301cad50685e3940fbcdf37f61 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Wed, 27 Dec 2017 14:10:54 -0800 Subject: 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 --- tools/aapt2/filter/AbiFilter.h | 2 ++ tools/aapt2/filter/Filter.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/aapt2/filter/AbiFilter.h b/tools/aapt2/filter/AbiFilter.h index d875cb2b127b..2832711efb2c 100644 --- a/tools/aapt2/filter/AbiFilter.h +++ b/tools/aapt2/filter/AbiFilter.h @@ -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 FromAbiList(const std::vector& abi_list); diff --git a/tools/aapt2/filter/Filter.h b/tools/aapt2/filter/Filter.h index d737dc92e87b..f932f9ccc82e 100644 --- a/tools/aapt2/filter/Filter.h +++ b/tools/aapt2/filter/Filter.h @@ -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; -- cgit v1.2.3-59-g8ed1b