From 7d0af80637afbc673e4bc9a34bcb556afdf3434d Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 17 Jul 2017 14:26:44 -0700 Subject: Small tidy of defines in util.h Avoid duplicate definitions. Change-Id: I33761277cceea538b8d58c10175cfc9e9951fcd4 Reviewed-on: https://pdfium-review.googlesource.com/8011 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fpdfsdk/javascript/util.cpp | 4 ---- fpdfsdk/javascript/util.h | 5 +++++ fpdfsdk/javascript/util_unittest.cpp | 5 ----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp index 5d1adc9298..93e178e9b7 100644 --- a/fpdfsdk/javascript/util.cpp +++ b/fpdfsdk/javascript/util.cpp @@ -38,10 +38,6 @@ JSMethodSpec CJS_Util::MethodSpecs[] = { IMPLEMENT_JS_CLASS(CJS_Util, util) -#define UTIL_INT 0 -#define UTIL_DOUBLE 1 -#define UTIL_STRING 2 - namespace { // Map PDF-style directives to equivalent wcsftime directives. Not diff --git a/fpdfsdk/javascript/util.h b/fpdfsdk/javascript/util.h index 125d193bda..60fa631dad 100644 --- a/fpdfsdk/javascript/util.h +++ b/fpdfsdk/javascript/util.h @@ -12,6 +12,11 @@ #include "fpdfsdk/javascript/JS_Define.h" +// Return values for ParseDataType() below. +#define UTIL_INT 0 +#define UTIL_DOUBLE 1 +#define UTIL_STRING 2 + class util : public CJS_EmbedObj { public: explicit util(CJS_Object* pJSObject); diff --git a/fpdfsdk/javascript/util_unittest.cpp b/fpdfsdk/javascript/util_unittest.cpp index b096f35a18..8e28dc1bdc 100644 --- a/fpdfsdk/javascript/util_unittest.cpp +++ b/fpdfsdk/javascript/util_unittest.cpp @@ -7,11 +7,6 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/test_support.h" -// Should mirror the defines in util.cpp. -#define UTIL_INT 0 -#define UTIL_DOUBLE 1 -#define UTIL_STRING 2 - TEST(CJS_Util, ParseDataType) { struct ParseDataTypeCase { const wchar_t* const input_string; -- cgit v1.2.3