summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/Consts.cpp
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-11-14 17:03:50 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2014-11-14 17:03:50 -0800
commit893fe94f069656ef5106db1aec32ec11b85f4de2 (patch)
treea0dba049ed478fd775976b8429308fb83a6ddda7 /fpdfsdk/src/javascript/Consts.cpp
parentd66fda28dc2159ffc68c312764172382825c4d10 (diff)
downloadpdfium-893fe94f069656ef5106db1aec32ec11b85f4de2.tar.xz
Remove FX_LPCWSTR cast to wchar_t* literals
BUG=https://code.google.com/p/pdfium/issues/detail?id=78 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/726143002
Diffstat (limited to 'fpdfsdk/src/javascript/Consts.cpp')
-rw-r--r--fpdfsdk/src/javascript/Consts.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/fpdfsdk/src/javascript/Consts.cpp b/fpdfsdk/src/javascript/Consts.cpp
index 278cd7eab8..1b1c8babcb 100644
--- a/fpdfsdk/src/javascript/Consts.cpp
+++ b/fpdfsdk/src/javascript/Consts.cpp
@@ -151,94 +151,94 @@ int CJS_GlobalConsts::Init(IJS_Runtime* pRuntime)
int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
{
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_NUMBER_ENTRY_DOT_SEP";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"[+-]?\\d*\\.?\\d*"};
+ FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP";
+ FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_NUMBER_COMMIT_DOT_SEP";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */
- (FX_LPCWSTR)L"[+-]?\\.\\d+", /* -.1 */
- (FX_LPCWSTR)L"[+-]?\\d+\\." /* -1. */
- };
+ FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP";
+ FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */
+ L"[+-]?\\.\\d+", /* -.1 */
+ L"[+-]?\\d+\\." /* -1. */
+ };
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_NUMBER_ENTRY_COMMA_SEP";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"[+-]?\\d*,?\\d*"};
+ FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP";
+ FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*,?\\d*"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_NUMBER_COMMIT_COMMA_SEP";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */
- (FX_LPCWSTR)L"[+-]?[.,]\\d+", /* -,1 */
- (FX_LPCWSTR)L"[+-]?\\d+[.,]" /* -1, */
- };
+ FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP";
+ FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */
+ L"[+-]?[.,]\\d+", /* -,1 */
+ L"[+-]?\\d+[.,]" /* -1, */
+ };
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_ZIP_ENTRY";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"\\d{0,5}"};
+ FX_LPCWSTR ArrayName = L"RE_ZIP_ENTRY";
+ FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_ZIP_COMMIT";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"\\d{5}"};
+ FX_LPCWSTR ArrayName = L"RE_ZIP_COMMIT";
+ FX_LPCWSTR ArrayContent[] = {L"\\d{5}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_ZIP4_ENTRY";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"\\d{0,5}(\\.|[- ])?\\d{0,4}"};
+ FX_LPCWSTR ArrayName = L"RE_ZIP4_ENTRY";
+ FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_ZIP4_COMMIT";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"\\d{5}(\\.|[- ])?\\d{4}"};
+ FX_LPCWSTR ArrayName = L"RE_ZIP4_COMMIT";
+ FX_LPCWSTR ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_PHONE_ENTRY";
+ FX_LPCWSTR ArrayName = L"RE_PHONE_ENTRY";
FX_LPCWSTR ArrayContent[] = {
- (FX_LPCWSTR)L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 555-1234 or 408 555-1234 */
- (FX_LPCWSTR)L"\\(\\d{0,3}", /* (408 */
- (FX_LPCWSTR)L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408) 555-1234 */
+ L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 555-1234 or 408 555-1234 */
+ L"\\(\\d{0,3}", /* (408 */
+ L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408) 555-1234 */
/* (allow the addition of parens as an afterthought) */
- (FX_LPCWSTR)L"\\(\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408 555-1234 */
- (FX_LPCWSTR)L"\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 408) 555-1234 */
- (FX_LPCWSTR)L"011(\\.|[- \\d])*" /* international */
+ L"\\(\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408 555-1234 */
+ L"\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 408) 555-1234 */
+ L"011(\\.|[- \\d])*" /* international */
};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_PHONE_COMMIT";
+ FX_LPCWSTR ArrayName = L"RE_PHONE_COMMIT";
FX_LPCWSTR ArrayContent[] = {
- (FX_LPCWSTR)L"\\d{3}(\\.|[- ])?\\d{4}", /* 555-1234 */
- (FX_LPCWSTR)L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* 408 555-1234 */
- (FX_LPCWSTR)L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* (408) 555-1234 */
- (FX_LPCWSTR)L"011(\\.|[- \\d])*" /* international */
+ L"\\d{3}(\\.|[- ])?\\d{4}", /* 555-1234 */
+ L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* 408 555-1234 */
+ L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* (408) 555-1234 */
+ L"011(\\.|[- \\d])*" /* international */
};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_SSN_ENTRY";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"};
+ FX_LPCWSTR ArrayName = L"RE_SSN_ENTRY";
+ FX_LPCWSTR ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}
{
- FX_LPCWSTR ArrayName = (FX_LPCWSTR)L"RE_SSN_COMMIT";
- FX_LPCWSTR ArrayContent[] = {(FX_LPCWSTR)L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"};
+ FX_LPCWSTR ArrayName = L"RE_SSN_COMMIT";
+ FX_LPCWSTR ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"};
DEFINE_GLOBAL_ARRAY(pRuntime);
}