Author: afester
Date: Mon May 14 09:51:45 2007
New Revision: 537910
URL: http://svn.apache.org/viewvc?view=rev&rev=537910
Log:
LOGCXX-14: tweak to avoid type mismatch warning between const and
non-const type
Modified:
logging/log4cxx/trunk/include/log4cxx/helpers/object.h
Modified: logging/log4cxx/trunk/include/log4cxx/helpers/object.h
URL:
http://svn.apache.org/viewvc/logging/log4cxx/trunk/include/log4cxx/helpers/object.h?view=diff&rev=537910&r1=537909&r2=537910
==============================================================================
--- logging/log4cxx/trunk/include/log4cxx/helpers/object.h (original)
+++ logging/log4cxx/trunk/include/log4cxx/helpers/object.h Mon May 14 09:51:45
2007
@@ -121,7 +121,7 @@
const void * cast(const helpers::Class& clazz) const\
{\
const void * object = 0;\
- if (&clazz == &helpers::Object::getStaticClass()) return
(helpers::Object *)this;
+ if (&clazz == &helpers::Object::getStaticClass()) return (const
helpers::Object *)this;
#define END_LOG4CXX_CAST_MAP()\
return object;\
@@ -130,7 +130,7 @@
{ return cast(clazz) != 0; }
#define LOG4CXX_CAST_ENTRY(Interface)\
-if (&clazz == &Interface::getStaticClass()) return (Interface *)this;
+if (&clazz == &Interface::getStaticClass()) return (const Interface *)this;
#define LOG4CXX_CAST_ENTRY2(Interface, interface2)\
if (&clazz == &Interface::getStaticClass()) return (Interface *)(interface2
*)this;