summaryrefslogtreecommitdiff
path: root/xfa/include/fwl
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-12-02 12:51:14 -0800
committerTom Sepez <tsepez@chromium.org>2015-12-02 12:51:14 -0800
commit9263e71cb259ab372d32722ee64e1a183b4b6088 (patch)
treec0c54c523688119454e44a6e303596f4b9b300a9 /xfa/include/fwl
parent8677d53e8730efc20c80a1ad75be4e10a9db21d0 (diff)
downloadpdfium-9263e71cb259ab372d32722ee64e1a183b4b6088.tar.xz
Remove _FWL_RETURN_IF_ macros
These hide early returns from the casual reader, hide the inversion of the condition under test from the reader, prevent the folding of conditions into a single statement, and take up more characters than the if() itself. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1494683002 .
Diffstat (limited to 'xfa/include/fwl')
-rw-r--r--xfa/include/fwl/core/fwl_error.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/xfa/include/fwl/core/fwl_error.h b/xfa/include/fwl/core/fwl_error.h
index 4f22dbbe57..5c92945289 100644
--- a/xfa/include/fwl/core/fwl_error.h
+++ b/xfa/include/fwl/core/fwl_error.h
@@ -19,69 +19,4 @@ typedef int32_t FWL_ERR;
#define FWL_ERR_Method_Not_Supported -400
#define FWL_ERR_Out_Of_Memory -500
-#if defined(__WIN32__) || defined(_WIN32)
-#define _FWL_ALARM_IF_FAIL(arg, alarm) \
- { \
- if (!(arg)) \
- ::OutputDebugString(alarm); \
- }
-#elif defined(__linux) || defined(linux) || defined(__APPLE__) || \
- defined(__MACOSX__)
-#define _FWL_ALARM_IF_FAIL(arg, alarm) \
- { \
- if (!(arg)) \
- printf(alarm); \
- }
-#else
-#endif
-#define _FWL_RETURN_IF_FAIL(arg) \
- { \
- if (!(arg)) \
- return; \
- }
-#define _FWL_RETURN_VALUE_IF_FAIL(arg, val) \
- { \
- if (!(arg)) \
- return val; \
- }
-#define _FWL_GOTO_POSITION_IF_FAIL(arg, pos) \
- { \
- if (!(arg)) \
- goto pos; \
- }
-#if defined(__WIN32__) || defined(_WIN32)
-#define _FWL_ERR_CHECK_ALARM_IF_FAIL(arg) \
- { \
- if ((arg) != FWL_ERR_Succeeded) { \
- char buf[36]; \
- memset(buf, 0, sizeof(buf)); \
- FXSYS_snprintf(buf, sizeof(buf) - 1, "Error code is %d\n", arg); \
- ::OutputDebugString(buf); \
- } \
- }
-#elif defined(__linux) || defined(linux) || defined(__APPLE__) || \
- defined(__MACOSX__)
-#define _FWL_ERR_CHECK_ALARM_IF_FAIL(arg) \
- { \
- if ((arg) != FWL_ERR_Succeeded) \
- printf("%d\n", arg); \
- }
-#else
-#endif
-#define _FWL_ERR_CHECK_RETURN_IF_FAIL(arg) \
- { \
- if ((arg) != FWL_ERR_Succeeded) \
- return; \
- }
-#define _FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(arg, val) \
- { \
- if ((arg) != FWL_ERR_Succeeded) \
- return val; \
- }
-#define _FWL_ERR_CHECK_GOTO_POSITION_IF_FAIL(arg, pos) \
- { \
- if ((arg) != FWL_ERR_Succeeded) \
- goto pos; \
- }
-
#endif // XFA_INCLUDE_FWL_CORE_FWL_ERROR_H_