Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

frameworks-base: Commit

frameworks/base


Commit MetaInfo

Revisión9d071102546d63f97b1a2851fa6f94c36a1f4cb8 (tree)
Tiempo2012-01-11 20:31:28
AutorJosh Stone <cuviper@gmai...>
CommiterChih-Wei Huang

Log Message

libutils: Fix an improper const-cast in RefBase

Under Fedora 15 Beta, gcc 4.6.0 warns:

frameworks/base/libs/utils/RefBase.cpp: In member function
‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing
‘const android::RefBase::weakref_impl’ as ‘this’ argument of
‘void android::RefBase::weakref_impl::trackMe(bool, bool)’
discards qualifiers [-fpermissive]

trackMe is not a const function, so don't use const in the static_cast
to a weakref_impl pointer.

Change-Id: I3c9ba73eb127985f5f54197ffecf2939c50f632c

Cambiar Resumen

Diferencia incremental

--- a/libs/utils/RefBase.cpp
+++ b/libs/utils/RefBase.cpp
@@ -524,7 +524,7 @@ void RefBase::weakref_type::printRefs() const
524524
525525 void RefBase::weakref_type::trackMe(bool enable, bool retain)
526526 {
527- static_cast<const weakref_impl*>(this)->trackMe(enable, retain);
527+ static_cast<weakref_impl*>(this)->trackMe(enable, retain);
528528 }
529529
530530 RefBase::weakref_type* RefBase::createWeak(const void* id) const
Show on old repository browser