summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index c41a1ac97a..7e582c0518 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -3985,10 +3985,10 @@ void CXFA_Node::SetItemState(int32_t nIndex,
int32_t iSel = -1;
std::vector<WideString> wsValueArray = GetSelectedItemsValue();
- auto it = std::find(wsValueArray.begin(), wsValueArray.end(),
- wsSaveTextArray[nIndex]);
- if (it != wsValueArray.end())
- iSel = it - wsValueArray.begin();
+ auto value_iter = std::find(wsValueArray.begin(), wsValueArray.end(),
+ wsSaveTextArray[nIndex]);
+ if (value_iter != wsValueArray.end())
+ iSel = value_iter - wsValueArray.begin();
if (IsChoiceListMultiSelect()) {
if (bSelected) {
@@ -4003,9 +4003,10 @@ void CXFA_Node::SetItemState(int32_t nIndex,
}
} else if (iSel >= 0) {
std::vector<int32_t> iSelArray = GetSelectedItems();
- auto it = std::find(iSelArray.begin(), iSelArray.end(), nIndex);
- if (it != iSelArray.end())
- iSelArray.erase(it);
+ auto selected_iter =
+ std::find(iSelArray.begin(), iSelArray.end(), nIndex);
+ if (selected_iter != iSelArray.end())
+ iSelArray.erase(selected_iter);
SetSelectedItems(iSelArray, bNotify, bScriptModify, bSyncData);
}
} else {