Index: xfa/include/fwl/core/fwl_note.h |
diff --git a/xfa/include/fwl/core/fwl_note.h b/xfa/include/fwl/core/fwl_note.h |
index 66366e92e44da5081f3778fdbed48e520dc4b1cd..d078387f522e3f12caac6a9b0692fa923d3f85bb 100644 |
--- a/xfa/include/fwl/core/fwl_note.h |
+++ b/xfa/include/fwl/core/fwl_note.h |
@@ -169,6 +169,9 @@ class CFWL_Message : public CFWL_Note { |
virtual ~CFWL_Message() {} |
virtual CFWL_Event* CloneToEvent() { return NULL; } |
}; |
+ |
+// FIXME: CloneToEvent() relies on events having the same layout as |
+// messages, and the hash in the "event" will be wrong, too. |
#define BEGIN_FWL_MESSAGE_DEF(classname, msghashcode) \ |
class classname : public CFWL_Message { \ |
public: \ |
@@ -182,7 +185,7 @@ class CFWL_Message : public CFWL_Note { |
virtual CFWL_Event* CloneToEvent() { \ |
classname* pEvent = new classname; \ |
pEvent->m_bIsEvent = TRUE; \ |
- return (CFWL_Event*)pEvent; \ |
+ return reinterpret_cast<CFWL_Event*>(pEvent); \ |
} |
#define END_FWL_MESSAGE_DEF \ |
} \ |