]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/object.h
fixed off by one error in wxXPMDecoder::ReadFile
[wxWidgets.git] / include / wx / object.h
index 03a23d01b2a7d8fc3a0eb203269d441f8571239b..845d0e238cfd187a880412387ab488cd110bc9ac 100644 (file)
@@ -177,9 +177,9 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
 
 // The 'this' pointer is always true, so use this version to cast the this
 // pointer and avoid compiler warnings.
-#define wxDynamicThisCast(obj, className) \
-        (((obj)->IsKindOf(&className::sm_class##className)) \
-        ? (className *)(obj) \
+#define wxDynamicCastThis(className) \
+        (IsKindOf(&className::sm_class##className) \
+        ? (className *)(this) \
         : (className *)0)
 
 #define wxConstCast(obj, className) ((className *)(obj))
@@ -198,6 +198,7 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
 #endif // Debug/!Debug
 
 // Unfortunately Borland seems to need this include.
+#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
 #ifdef __BORLANDC__
     #if wxUSE_IOSTREAMH
         #include <iostream.h>
@@ -205,6 +206,7 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
         #include <iostream>
     #endif
 #endif
+#endif
 
 class WXDLLEXPORT wxObjectRefData;