From 00e56a248dd214555d9d0fda9d0f064e8d23e9cf Mon Sep 17 00:00:00 2001 From: Ukri Niemimuukko Date: Tue, 29 Apr 2014 06:25:28 +0800 Subject: RefBase: make Renamer destructor virtual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch makes the Renamer class destructor virtual and fixes the incorrect constructor initialization list ordering. These issues and related compiler warnings have been suppressed by the build system which uses the gcc –isystem command line option, unless a project explicitly adds the include the path system/core/include to Android.mk and uses the templates. Change-Id: Iff76a655eb8bd547adfe994c7315a005e98aed41 Signed-off-by: Ukri Niemimuukko Signed-off-by: Mingwei Shi Signed-off-by: Yong Yao --- include/utils/RefBase.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/utils/RefBase.h b/include/utils/RefBase.h index cbfe13a..ac1ac6c 100644 --- a/include/utils/RefBase.h +++ b/include/utils/RefBase.h @@ -484,7 +484,8 @@ public: TYPE::renameRefId(d[i].get(), &s[i], &d[i]); } public: - Renamer(sp* d, sp const* s) : s(s), d(d) { } + Renamer(sp* d, sp const* s) : d(d), s(s) { } + virtual ~Renamer() { } }; memmove(d, s, n*sizeof(sp)); @@ -503,7 +504,8 @@ public: TYPE::renameRefId(d[i].get_refs(), &s[i], &d[i]); } public: - Renamer(wp* d, wp const* s) : s(s), d(d) { } + Renamer(wp* d, wp const* s) : d(d), s(s) { } + virtual ~Renamer() { } }; memmove(d, s, n*sizeof(wp)); -- cgit v1.1