summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-01 15:31:40 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-01 15:31:40 -0700
commit4af5fd19d4101079d5a47412e07a5daaf3dade6e (patch)
tree94493ab11afc0ed1a16dd753db27e436f1a0069e
parent23863e4c86a99381c1bd83e76c9055b10a8bf6c4 (diff)
downloadpdfium-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
-rw-r--r--xfa/fgas/localization/fgas_locale.cpp7
-rw-r--r--xfa/fxfa/fm2js/xfa_expression.cpp8
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression.cpp53
3 files changed, 34 insertions, 34 deletions
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index a6443f4de7..2d72454038 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -56,10 +56,9 @@ static const FX_LOCALETIMEZONEINFO g_FXLocaleTimeZoneData[] = {
{FXBSTR_ID(0, 'P', 'D', 'T'), -7, 0}, {FXBSTR_ID(0, 'P', 'S', 'T'), -8, 0},
};
-static const CFX_WideStringC gs_wsTextSymbols = FX_WSTRC(L"AXO09");
-static const CFX_WideStringC gs_wsTimeSymbols = FX_WSTRC(L"hHkKMSFAzZ");
-static const CFX_WideStringC gs_wsDateSymbols = FX_WSTRC(L"DJMEeGgYwW");
-static const CFX_WideStringC gs_wsConstChars = FX_WSTRC(L",-:/. ");
+static const FX_WCHAR gs_wsTimeSymbols[] = L"hHkKMSFAzZ";
+static const FX_WCHAR gs_wsDateSymbols[] = L"DJMEeGgYwW";
+static const FX_WCHAR gs_wsConstChars[] = L",-:/. ";
static FX_STRSIZE FX_Local_Find(const CFX_WideStringC& wsSymbols,
FX_WCHAR ch,
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"},