Kill FX_DEFINEHANDLE
authorTom Sepez <tsepez@chromium.org>
Mon, 4 May 2015 21:53:09 +0000 (14:53 -0700)
committerTom Sepez <tsepez@chromium.org>
Mon, 4 May 2015 21:53:09 +0000 (14:53 -0700)
I spent at least 2 minutes grep'ing for a class or struct (on the other
branch) that was delcared using this.

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1129433002

core/include/fxcrt/fx_stream.h
core/include/fxcrt/fx_system.h
core/include/fxge/fpf.h

index 6732789..73bb8a7 100644 (file)
@@ -16,7 +16,9 @@ FX_BOOL FX_GetNextFile(void* handle, CFX_ByteString& filename, FX_BOOL& bFolder)
 FX_BOOL FX_GetNextFile(void* handle, CFX_WideString& filename, FX_BOOL& bFolder);
 void FX_CloseFolder(void* handle);
 FX_WCHAR FX_GetFolderSeparator();
-FX_DEFINEHANDLE(FX_HFILE)
+typedef struct FX_HFILE_ {
+    FX_LPVOID pData;
+}* FX_HFILE;
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 #define FX_FILESIZE                    FX_INT32
 #else
index d030bf7..ce86d5a 100644 (file)
@@ -110,7 +110,6 @@ typedef wchar_t*                            FX_LPWSTR;
 typedef wchar_t const*                 FX_LPCWSTR;
 typedef FX_DWORD                               FX_UINT32;
 typedef FX_UINT64                              FX_QWORD;
-#define FX_DEFINEHANDLE(name)  typedef struct _##name {FX_LPVOID pData;} * name;
 #if defined(DEBUG) && !defined(_DEBUG)
 #define _DEBUG
 #endif
index 28d028c..9fb38f8 100644 (file)
@@ -18,7 +18,9 @@ public:
 };
 IFPF_DeviceModule*     FPF_GetDeviceModule();
 #define FPF_MATCHFONT_REPLACEANSI              1
-FX_DEFINEHANDLE(FPF_HFONT);
+typedef struct FPF_HFONT_ {
+    FX_LPVOID pData;
+}* FPF_HFONT;
 class IFPF_Font
 {
 public: