diff options
author | Ukri Niemimuukko <ukri.niemimuukko@intel.com> | 2014-04-29 06:25:28 +0800 |
---|---|---|
committer | Yong Yao <yong.yao@intel.com> | 2014-08-06 00:12:06 -0700 |
commit | 00e56a248dd214555d9d0fda9d0f064e8d23e9cf (patch) | |
tree | b222ec862ba34bc0cafcae0123e11cfdef74df36 /include/utils | |
parent | 8022ce1e8742fc21aa0f4653d905c5a404b941dc (diff) | |
download | system_core-00e56a248dd214555d9d0fda9d0f064e8d23e9cf.zip system_core-00e56a248dd214555d9d0fda9d0f064e8d23e9cf.tar.gz system_core-00e56a248dd214555d9d0fda9d0f064e8d23e9cf.tar.bz2 |
RefBase: make Renamer destructor virtual
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 <ukri.niemimuukko@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>
Diffstat (limited to 'include/utils')
-rw-r--r-- | include/utils/RefBase.h | 6 |
1 files changed, 4 insertions, 2 deletions
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<TYPE>* d, sp<TYPE> const* s) : s(s), d(d) { } + Renamer(sp<TYPE>* d, sp<TYPE> const* s) : d(d), s(s) { } + virtual ~Renamer() { } }; memmove(d, s, n*sizeof(sp<TYPE>)); @@ -503,7 +504,8 @@ public: TYPE::renameRefId(d[i].get_refs(), &s[i], &d[i]); } public: - Renamer(wp<TYPE>* d, wp<TYPE> const* s) : s(s), d(d) { } + Renamer(wp<TYPE>* d, wp<TYPE> const* s) : d(d), s(s) { } + virtual ~Renamer() { } }; memmove(d, s, n*sizeof(wp<TYPE>)); |