summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Define.h
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-02 13:31:10 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-02 13:31:10 -0700
commitfbe14b97f00b866e69e0970881550f6d6d9465cd (patch)
tree11efcdd726ae53f2d6d8ed1b5bc805005d92d35f /fpdfsdk/javascript/JS_Define.h
parenta354eb517429e10d84abff65e455f0c183fe58e0 (diff)
downloadpdfium-fbe14b97f00b866e69e0970881550f6d6d9465cd.tar.xz
Fix lint bugs.
Also fix typos and overrides. Review-Url: https://codereview.chromium.org/1935793002
Diffstat (limited to 'fpdfsdk/javascript/JS_Define.h')
-rw-r--r--fpdfsdk/javascript/JS_Define.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/fpdfsdk/javascript/JS_Define.h b/fpdfsdk/javascript/JS_Define.h
index c7872599bf..2c00818d08 100644
--- a/fpdfsdk/javascript/JS_Define.h
+++ b/fpdfsdk/javascript/JS_Define.h
@@ -17,7 +17,7 @@
struct JSConstSpec {
const wchar_t* pName;
double number;
- const wchar_t* string; // NOLINT
+ const wchar_t* str;
uint8_t t; // 0:double 1:str
};
@@ -50,12 +50,9 @@ struct JSMethodSpec {
#define BEGIN_JS_STATIC_PROP(js_class_name) \
JSPropertySpec js_class_name::JS_Class_Properties[] = {
-#define JS_STATIC_PROP_ENTRY(prop_name) \
- { \
- JS_WIDESTRING(prop_name), get_##prop_name##_static, \
- set_##prop_name##_static \
- } \
- ,
+#define JS_STATIC_PROP_ENTRY(prop_name) \
+ {JS_WIDESTRING(prop_name), get_##prop_name##_static, \
+ set_##prop_name##_static}, // NOLINT
#define END_JS_STATIC_PROP() \
{ 0, 0, 0 } \
@@ -211,15 +208,15 @@ void JSMethod(const char* method_name_string,
static JSConstSpec JS_Class_Consts[]; \
static void DefineConsts(v8::Isolate* pIsolate);
-#define IMPLEMENT_JS_CLASS_CONST_PART(js_class_name, class_name) \
- void js_class_name::DefineConsts(v8::Isolate* pIsolate) { \
- for (size_t i = 0; i < FX_ArraySize(JS_Class_Consts) - 1; ++i) { \
- FXJS_DefineObjConst( \
- pIsolate, g_nObjDefnID, JS_Class_Consts[i].pName, \
- JS_Class_Consts[i].t == 0 \
- ? FXJS_NewNumber(pIsolate, JS_Class_Consts[i].number) \
- : FXJS_NewString(pIsolate, JS_Class_Consts[i].string)); \
- } \
+#define IMPLEMENT_JS_CLASS_CONST_PART(js_class_name, class_name) \
+ void js_class_name::DefineConsts(v8::Isolate* pIsolate) { \
+ for (size_t i = 0; i < FX_ArraySize(JS_Class_Consts) - 1; ++i) { \
+ FXJS_DefineObjConst( \
+ pIsolate, g_nObjDefnID, JS_Class_Consts[i].pName, \
+ JS_Class_Consts[i].t == 0 \
+ ? FXJS_NewNumber(pIsolate, JS_Class_Consts[i].number) \
+ : FXJS_NewString(pIsolate, JS_Class_Consts[i].str)); \
+ } \
}
// Convenience macros for declaring classes without an alternate.