summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-07-17 14:26:44 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-07-18 19:58:42 +0000
commit7d0af80637afbc673e4bc9a34bcb556afdf3434d (patch)
treef1e8a47075fb7f977772746d6b1f8ab05175a8ce /fpdfsdk
parent56725242559dd80e3b54fd9905c36bdeb696cdd9 (diff)
downloadpdfium-chromium/3161.tar.xz
Small tidy of defines in util.hchromium/3161
Avoid duplicate definitions. Change-Id: I33761277cceea538b8d58c10175cfc9e9951fcd4 Reviewed-on: https://pdfium-review.googlesource.com/8011 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/javascript/util.cpp4
-rw-r--r--fpdfsdk/javascript/util.h5
-rw-r--r--fpdfsdk/javascript/util_unittest.cpp5
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;