diff options
author | tsepez <tsepez@chromium.org> | 2016-04-01 15:31:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-01 15:31:40 -0700 |
commit | 4af5fd19d4101079d5a47412e07a5daaf3dade6e (patch) | |
tree | 94493ab11afc0ed1a16dd753db27e436f1a0069e /xfa/fxfa/fm2js | |
parent | 23863e4c86a99381c1bd83e76c9055b10a8bf6c4 (diff) | |
download | pdfium-4af5fd19d4101079d5a47412e07a5daaf3dade6e.tar.xz |
Remove CFX_ string type static initializers.
In XFA, we were constructing some CFX_ string types before
we reached main(). Setting breakpoints on these as well as
main() shows we hit main first after applying the patch.
Doing so also turned up an unused variable, presumably because
the static initializer made it appear used.
Review URL: https://codereview.chromium.org/1846353002
Diffstat (limited to 'xfa/fxfa/fm2js')
-rw-r--r-- | xfa/fxfa/fm2js/xfa_expression.cpp | 8 | ||||
-rw-r--r-- | xfa/fxfa/fm2js/xfa_simpleexpression.cpp | 53 |
2 files changed, 31 insertions, 30 deletions
diff --git a/xfa/fxfa/fm2js/xfa_expression.cpp b/xfa/fxfa/fm2js/xfa_expression.cpp index 0166fa609f..be9fb09c0d 100644 --- a/xfa/fxfa/fm2js/xfa_expression.cpp +++ b/xfa/fxfa/fm2js/xfa_expression.cpp @@ -10,11 +10,11 @@ namespace { -const CFX_WideStringC RUNTIMEBLOCKTEMPARRAY = - FX_WSTRC(L"foxit_xfa_formcalc_runtime_block_temp_array"); +const FX_WCHAR RUNTIMEBLOCKTEMPARRAY[] = + L"foxit_xfa_formcalc_runtime_block_temp_array"; -const CFX_WideStringC RUNTIMEBLOCKTEMPARRAYINDEX = - FX_WSTRC(L"foxit_xfa_formcalc_runtime_block_temp_array_index"); +const FX_WCHAR RUNTIMEBLOCKTEMPARRAYINDEX[] = + L"foxit_xfa_formcalc_runtime_block_temp_array_index"; } // namespace diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp index f1e1137459..8ac80d7c08 100644 --- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp +++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp @@ -10,38 +10,39 @@ namespace { -const CFX_WideStringC gs_lpStrExpFuncName[] = { - FX_WSTRC(L"foxit_xfa_formcalc_runtime.assign_value_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.logical_or_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.logical_and_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.equality_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.notequality_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.less_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.lessequal_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.greater_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.greaterequal_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.plus_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.minus_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.multiple_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.divide_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.positive_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.negative_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.logical_not_operator"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime."), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.dot_accessor"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.dotdot_accessor"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.concat_fm_object"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.is_fm_object"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.is_fm_array"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.get_fm_value"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.get_fm_jsobj"), - FX_WSTRC(L"foxit_xfa_formcalc_runtime.fm_var_filter"), +const FX_WCHAR* const gs_lpStrExpFuncName[] = { + L"foxit_xfa_formcalc_runtime.assign_value_operator", + L"foxit_xfa_formcalc_runtime.logical_or_operator", + L"foxit_xfa_formcalc_runtime.logical_and_operator", + L"foxit_xfa_formcalc_runtime.equality_operator", + L"foxit_xfa_formcalc_runtime.notequality_operator", + L"foxit_xfa_formcalc_runtime.less_operator", + L"foxit_xfa_formcalc_runtime.lessequal_operator", + L"foxit_xfa_formcalc_runtime.greater_operator", + L"foxit_xfa_formcalc_runtime.greaterequal_operator", + L"foxit_xfa_formcalc_runtime.plus_operator", + L"foxit_xfa_formcalc_runtime.minus_operator", + L"foxit_xfa_formcalc_runtime.multiple_operator", + L"foxit_xfa_formcalc_runtime.divide_operator", + L"foxit_xfa_formcalc_runtime.positive_operator", + L"foxit_xfa_formcalc_runtime.negative_operator", + L"foxit_xfa_formcalc_runtime.logical_not_operator", + L"foxit_xfa_formcalc_runtime.", + L"foxit_xfa_formcalc_runtime.dot_accessor", + L"foxit_xfa_formcalc_runtime.dotdot_accessor", + L"foxit_xfa_formcalc_runtime.concat_fm_object", + L"foxit_xfa_formcalc_runtime.is_fm_object", + L"foxit_xfa_formcalc_runtime.is_fm_array", + L"foxit_xfa_formcalc_runtime.get_fm_value", + L"foxit_xfa_formcalc_runtime.get_fm_jsobj", + L"foxit_xfa_formcalc_runtime.fm_var_filter", }; struct XFA_FMBuildInFunc { uint32_t m_uHash; const FX_WCHAR* m_buildinfunc; }; + const XFA_FMBuildInFunc g_BuildInFuncs[] = { {0x0001f1f5, L"At"}, {0x00020b9c, L"FV"}, {0x00021aef, L"If"}, {0x00023ee6, L"PV"}, |