From 0556f3382bfb50c9c3aa25106589445de7bbb755 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Tue, 9 Jan 2018 22:31:45 -0800 Subject: [PATCH] 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: Ia84c118db1a53f1ac846354a6023726e394a87ed --- tools/aapt2/LoadedApk.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/aapt2/LoadedApk.h b/tools/aapt2/LoadedApk.h index 6d2257f2e17a0..81bcecc3ca5d6 100644 --- a/tools/aapt2/LoadedApk.h +++ b/tools/aapt2/LoadedApk.h @@ -42,6 +42,8 @@ enum ApkFormat { // Info about an APK loaded in memory. class LoadedApk { public: + virtual ~LoadedApk() = default; + // Loads both binary and proto APKs from disk. static std::unique_ptr LoadApkFromPath(const ::android::StringPiece& path, IDiagnostics* diag);