diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-12-09 16:22:47 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-12-09 16:22:47 -0800 |
commit | e021e084717b8cc43f8a0667ad9d1a807dfe381c (patch) | |
tree | 5c105cb044fd8cb07d0c7595d4c8c044cb2b98bc /xfa/include | |
parent | 8ee79f8f2824d5b7058d49ebb10ced6b001c178e (diff) | |
download | pdfium-e021e084717b8cc43f8a0667ad9d1a807dfe381c.tar.xz |
Fix errors in BEGIN_FWL_MESSAGE_DEF macros
The proper way to "wide-stringify" a parameter is by L###arg,
not L"## arg ##", which does no replacement. Also remove dubious
CloneToEvent() method, and make the proper event in the one place
it is called.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1510493005 .
Diffstat (limited to 'xfa/include')
-rw-r--r-- | xfa/include/fwl/core/fwl_note.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/xfa/include/fwl/core/fwl_note.h b/xfa/include/fwl/core/fwl_note.h index e6579bff10..a838d8047f 100644 --- a/xfa/include/fwl/core/fwl_note.h +++ b/xfa/include/fwl/core/fwl_note.h @@ -170,7 +170,6 @@ class CFWL_Message : public CFWL_Note { public:
CFWL_Message() : CFWL_Note(FALSE) {}
virtual ~CFWL_Message() {}
- virtual CFWL_Event* CloneToEvent() { return NULL; }
};
#define BEGIN_FWL_MESSAGE_DEF(classname, msghashcode) \
class classname : public CFWL_Message { \
@@ -178,15 +177,10 @@ class CFWL_Message : public CFWL_Note { classname() : CFWL_Message() {} \
virtual CFWL_Note* Clone() { return new classname(*this); } \
virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { \
- wsClass = L" ## classname ## "; \
+ wsClass = L## #classname; \
return FWL_ERR_Succeeded; \
} \
- virtual FX_DWORD GetClassID() const { return msghashcode; } \
- virtual CFWL_Event* CloneToEvent() { \
- classname* pEvent = new classname; \
- pEvent->m_bIsEvent = TRUE; \
- return (CFWL_Event*)pEvent; \
- }
+ virtual FX_DWORD GetClassID() const { return msghashcode; }
#define END_FWL_MESSAGE_DEF \
} \
;
@@ -258,7 +252,7 @@ class CFWL_Event : public CFWL_Note { public: \
classname() : CFWL_Event() {} \
virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { \
- wsClass = L" ## classname ## "; \
+ wsClass = L## #classname; \
return FWL_ERR_Succeeded; \
} \
virtual FX_DWORD GetClassID() const { return eventhashcode; }
|